
hello, this is not supposed to be serious :-) Sebastian Sylvan wrote:
... List comprehensions are overrated =)
How about this:
concatMap ( (':':) . (:[]) . fst ) [('d',3),('f',3)]
or even better: [('d',3),('f',3)] >>= (':':) . return . fst bye iavor -- ================================================== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.ogi.edu/~diatchki | ==================================================

On Thu, 07 Aug 2003 17:27:58 +0000
Iavor Diatchki
hello,
this is not supposed to be serious :-)
Sebastian Sylvan wrote:
... List comprehensions are overrated =)
How about this:
concatMap ( (':':) . (:[]) . fst ) [('d',3),('f',3)]
or even better:
[('d',3),('f',3)] >>= (':':) . return . fst
bye iavor
Well, if you're going to do that you might as well go for full generality, return ('d',3) `mplus` return ('f',3) >>= (return ':' `mplus`) . return . fst
participants (2)
-
Derek Elkins
-
Iavor Diatchki