A simple example of how you can use kotlin to build a DSL, describing state machines