Last active
October 8, 2020 19:35
-
-
Save satriahrh/68e9d9a1c8a0f5012efabc06a3946b1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type State string | |
type Event string | |
type Action struct { | |
Destination State | |
} | |
type Transition map[Event]Action | |
type StateMap map[State]Transition | |
type FiniteStateMachine struct { | |
Initial State | |
current State | |
StateMap StateMap | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment