I seem to recall this proposal being included on the Haskell' proposals. Ah, here it is:<br><br><a href="http://hackage.haskell.org/trac/haskell-prime/ticket/41">http://hackage.haskell.org/trac/haskell-prime/ticket/41</a><br>
<br>-Edward Kmett<br><br><div class="gmail_quote">On Thu, Nov 5, 2009 at 10:09 AM, Sebastiaan Visser <span dir="ltr"><<a href="mailto:sfvisser@cs.uu.nl">sfvisser@cs.uu.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
<br>
Wouldn't it be nice if we could write point free case statements?<br>
<br>
I regularly find myself writing down something like this:<br>
<br>
> myFunc = anotherFunc $ \x -> case x of<br>
> Left err -> print err<br>
> Right msg -> putStrLn msg<br>
<br>
We could really use a case statement in which we skip the scrutinee and make `(case of {})' be syntactic sugar for `(\x -> case x of {})'.<br>
<br>
So we could write:<br>
<br>
> myFunc = anotherFunc $ case of<br>
> Left err -> print err<br>
> Right msg -> putStrLn msg<br>
<br>
A minor syntactical addition, a big win!<br>
<br>
Cheers,<br><font color="#888888">
<br>
--<br>
Sebastiaan Visser<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</font></blockquote></div><br>