[Haskell-cafe] return in Monad class necessary?
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Nov 26 14:41:30 EST 2007
Hello Henning,
Monday, November 26, 2007, 9:48:29 PM, you wrote:
> I wonder whether it is a typical mistake of beginners
> to write 'return' within a do-block (that is, not at the end)
don't forget that `return` is also used to force evaluation:
do let n = a+b
return $! n
writeChan c (n,1)
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list