[Haskell-cafe] return in Monad class necessary?
Henning Thielemann
lemming at henning-thielemann.de
Mon Nov 26 13:48:29 EST 2007
I wonder whether it is a typical mistake of beginners
to write 'return' within a do-block (that is, not at the end)
and if it is possible to avoid this mistake by clever typing.
In a proper monad 'return' can be fused with subsequent actions,
and thus it is not necessary within a sequence of actions.
However, although sensible, 'return' is also not required at the end of a block.
Has someone already thought about a replacement for monads?
More information about the Haskell-Cafe
mailing list