HI && TypeCast

Derek Elkins ddarius@hotpop.com
Thu, 7 Aug 2003 16:16:04 -0400


On Thu, 07 Aug 2003 17:27:58 +0000
Iavor Diatchki <diatchki@cse.ogi.edu> wrote:

> 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