This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
module StateMachine = | |
type State<'Event> = | |
| Next of ('Event -> State<'Event>) | |
| Stop | |
let feed state event = | |
match state with | |
| Stop -> failwith "Terminal state reached" | |
| Next handler -> event |> handler |