23 Apr
2002
23 Apr
'02
6:03 p.m.
Hal Daume III wrote:
I'd like to be able to define something like
single x = \y -> if x == y then True else False
Just a note on style: it always hurts me to see something like if term then True else False -- this is just the same as 'term'. So you could say single x = \y -> x==y which is in turn just the same as single x = (x==) which is, amazingly, nothing more than single = (==) -- one can debatte whether this is still better style than the first variant, but it's surely interesting to realize. All the best, Christian Sievers