Andrew Coppin wrote: > Heinrich Apfelmus wrote: >> Andrew Coppin wrote: >> >>>> instance (Monad m) => Functor m where >>>> fmap f ma = do a <- ma; return (f a) >>>> >>> While that's quite interesting from a mathematical point of view, how is >>> this "useful" for programming purposes? >>> >> >> Surely, you agree that liftM is "useful"? Because that's the same >> thing. >> > > Then why not just use liftM? (That way, you know what it does...)
liftM (*1) [1..10] = [2,4,6,8,10,12,14,16,18,20] Regards, apfelmus -- http://apfelmus.nfshost.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe