Haskell for all: Why free monads matter
It forks the current context. For example, let's say I write:forkPlus :: Free Expr BoolforkPlus = liftF $ Plus False TrueThen it would behave just like C's fork implementation, where the return value tells you which branch of the computation you are on:do bool <- forkPlus if bool then ... -- On theā¦
Hasnain says:
Monads and more Monads - writing Interpreters using Free Monads
Posted on 2014-04-09T17:18:55+0000