[Haskell-cafe] mixing map and mapM ?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Sun May 9 08:29:54 EDT 2010
On May 9, 2010, at 07:18 , wren ng thornton wrote:
> Where available, the fmap version is the most efficient. The liftM
> function can be less efficient since it's defined generically
> (namely with the bind/return definition above), whereas fmap can
> take advantage of knowing the specific monad it's working on. But
> then, not everyone defines Functor instances for their monads...
Arguably that deserves a bug report, as logically a Monad is an
Applicative is a Functor (or read "is a" as "subset of" for pedantry).
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100509/f6863189/PGP.bin
More information about the Haskell-Cafe
mailing list