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
//: Playground - noun: a place where people can play | |
import UIKit | |
/// A finite state machine | |
final class FSM<State, Transition>: ObservableObject where State: Hashable, Transition: Hashable { | |
/// current state | |
@Published private(set) var state: State | |
/// state transition graph |
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
(ns parse.core | |
(:require [instaparse.core :as insta])) | |
(def parser | |
(insta/parser | |
"sexp = lparen operation rparen | |
<lparen> = <'('> | |
<rparen> = <')'> | |
operation = operator + args | |
operator = '+' |
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
set PATH $HOME/.rbenv/bin $PATH | |
set PATH $HOME/.rbenv/shims $PATH | |
rbenv rehash >/dev/null ^&1 |