Yet another implementation of cond

27 Jun
2007
27 Jun
'07
10:07 p.m.
I discovered this trick the other day, and didn't remember seeing it anywhere as a cond implementation: head $ [ e1 | cond1 ] ++ [ e2 | cond2 ] ++ [ e3 | cond3 ] etc. You can even use full pattern guards (more powerful than GHC's) in your conditions! Jonathan Cast http://sourceforge.net/projects/fid-core http://sourceforge.net/projects/fid-emacs

28 Jun
28 Jun
6:56 a.m.
On Wed, Jun 27, 2007 at 05:07:54PM -0500, Jon Cast wrote:
I discovered this trick the other day, and didn't remember seeing it anywhere as a cond implementation:
head $ [ e1 | cond1 ] ++ [ e2 | cond2 ] ++ [ e3 | cond3 ]
Cool! Thanks for sharing it. All the best, andrea
6589
Age (days ago)
6590
Last active (days ago)
1 comments
2 participants
participants (2)
-
Andrea Rossato
-
Jon Cast