by Angel Leon. March 17, 2015;
Last update on December 14, 2023
Updated on February 27, 2023
Updated August 29, 2019.
| 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 |
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 8000This 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