
19 Jan
2004
19 Jan
'04
9:24 a.m.
In local.libraries, you wrote:
box x = [x] map box xs map (\x -> [x]) xs
is more self contained, and not much longer. (I don't mean any offence to the author and users of 'box'; it's a matter of personal preference, how big a function neds to be before it deserves a name.)
I always thought it was natural to use map return xs (obviously with the right context for "return"). It's a pity that 'singleton' went away (or did it never exist in the Prelude at all?). Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine