[Haskell-beginners] Simplifying a 'split' function

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Apr 30 08:12:23 EDT 2009


On Apr 29, 2009, at 16:12 , Ben Sanders wrote:
>> How about map pure.  I do like the robot monkey though :)
>
> What is 'map pure'?

It uses the applicative functor (Control.Applicative) instance for  
lists, just as "fmap return" uses the monad instance.  Both work out  
to the same thing.

-- 
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/beginners/attachments/20090430/c863206e/PGP.bin


More information about the Beginners mailing list