[Haskell-cafe] All equations must have the same arity - why?
ajb at spamcop.net
ajb at spamcop.net
Sun Jan 13 18:58:36 EST 2008
G'day all.
Quoting Conal Elliott <conal at conal.net>:
> 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
More information about the Haskell-Cafe
mailing list