Rewriting Slipshow in OCaml: The undo-able monad