Is there a way to combine:

Higher order finite state machines that require other states as parameters to work.

https://github.com/sdzx-1/ray-game/blob/master/src/select.zi...

The select, inside, and hover states here are all high-level states, and all require two state parameters. And these three states form a small state machine for handling mouse interactive selection.

Can I think of this way of using higher-order state machines as a kind of composition? A semantic composition.

From this perspective, do you think my previous description is accurate?