Created
January 11, 2019 23:37
-
-
Save ed-george/de64f279097fd162bd17ef118ee7aff5 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
data class DFA( | |
val states: Set<State>, | |
val inputs: Set<Input>, | |
val delta: (State, Input) -> State, | |
val initialState: State, | |
val isFinalState: (State) -> Boolean | |
) | |
data class State(val name: String) | |
data class Input(val value: String) | |
val a = Input("press") | |
val s0 = State("off") | |
val s1 = State("on") | |
data class State(val name: String) | |
data class Input(val value: String) | |
val a = Input("press") | |
val s0 = State("off") | |
val s1 = State("on") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment