transitionOn

This is more powerful version of transition function. Here target state is a lambda which returns desired State. This allows to use lateinit state variables for recursively depending states and choose target state depending on application business logic.

This is a special kind of conditional transition but with simpler syntax and less flexibility.