
13 Jan
2008
13 Jan
'08
6:58 p.m.
G'day all.
Quoting Conal Elliott
That eta-expansion desugaring would lose sharing. Offhand, I don't know of a desugaring that would do the trick and preserve sharing. Any ideas?
How about this? f = let body = sort . nub in \xs -> case xs of [] -> [1] (_:_) -> body I suspect we're well out of the territory of mere "desugaring" here, though. Cheers, Andrew Bromage