Turnstile State Machine

Run Settings
LanguageF#
Language Version
Run Command
type State = Locked | Unlocked type Input = Coin | Push let next state input = match state, input with | Locked, Coin -> Unlocked | Unlocked, Push -> Locked | _ -> state printfn "%A" (next Locked Coin) printfn "%A" (List.ofSeq (Seq.scan next Locked [Coin; Coin; Push; Push; Coin]))
Editor Settings
Theme
Key bindings
Full width
Lines