
9 May
2010
9 May
'10
8:29 a.m.
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@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH