January 2014
Beginner
428 pages
14h 1m
English
APPENDIX B
![]()
Time Traveling with Haskell
Now that you’ve come to this point, it’s time to tell you one secret that only Haskellers are allowed to know: our code can travel in time! To do so, you need to kindly ask the Doctor1 for his TARDIS Time Machine. Gratefully, the machine has a Haskell form: it can be converted into a monad.
The Tardis monad is provided by the tardis package in Hackage. The interface is similar to a State monad, but you can work with state that travels in the normal way, from the current step of execution forward in time, and with state that works backward in time. For each of those states you have a pair of functions in ...
Read now
Unlock full access