[Haskell-cafe] Lambda-case / lambda-if
batterseapower at hotmail.com
Tue Oct 5 19:06:24 EDT 2010
On 4 October 2010 00:38, Conal Elliott <conal at conal.net> wrote:
> I like it!
> Are the other sections available as well, e.g.,
> (if False then else "Cafe") "Haskell" --> "Cafe"
They are not, though this would certainly make sense for lambda-if.
It's not so clear with lambda-case because of the issue of free
variables. Potentially we could support something like this, but it's
a bit scary-looking:
(case x of Just -> ; Nothing ->) (\y -> "I'm a Just") "I'm a nothing"
More information about the Haskell-Cafe