[Haskell-beginners] What to do next?

Henk-Jan van Tuyl hjgtuyl at chello.nl
Thu Mar 27 22:06:02 UTC 2014


On Thu, 27 Mar 2014 16:50:28 +0100, bruce li <leilmyxwz at gmail.com> wrote:

> 2. How to write cooler code like  lift2 ((++) =<<) preillion postillion?
> How could I make such usage a habit?

I think it is better to not make this a habit; such coding is both hard to  
write and read. IMHO a better way to write this, is using a list  
comprehension:
     [x ++ y | x <- preillion, y <- postillion]

I simple cases, point-free style[0] can be an advantage, however.

Regards,
Henk-Jan van Tuyl


[0] http://www.haskell.org/haskellwiki/Pointfree


-- 
Folding at home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


More information about the Beginners mailing list