placeholder

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ā€¦

Click to view the original at haskellforall.com