[Haskell-cafe] Lazy Evaluation in Monads
stephen.tetley at gmail.com
Tue May 31 23:05:11 CEST 2011
2011/5/31 Scott Lawrence <bytbox at gmail.com>:
> Evaluation here also doesn't terminate (or, (head $ unfoldM (return .
> head)) doesn't), although I can't figure out why. fmap shouldn't need to
> fully evaluate a list to prepend an element, right?
I'm afriad fmap doesn't get to choose - if the monad is strict then
both definitions are equivalent (probably...).
More information about the Haskell-Cafe