On Thu, Apr 24, 2008 at 11:28 PM, Ben <[EMAIL PROTECTED]> wrote:
>  2) Is there a reason to not use mapM3 above?

Yes, there certainly is.  mapM3 is not equivalent to mapM; it is too strict:

*Main> take 3 $ head $ mapM return [1,2,3,4,undefined]
[1,2,3]
*Main> take 3 $ head $ mapM3 return [1,2,3,4,undefined]
[*** Exception: Prelude.undefined

So, like foldl', mapM3 seems a viable alternative for mapM, but not a
replacement.

Luke
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to