2009/11/5 Sebastiaan Visser sfvis...@cs.uu.nl:
Hello all,
Wouldn't it be nice if we could write point free case statements?
I regularly find myself writing down something like this:
myFunc = anotherFunc $ \x - case x of
Left err - print err
Excerpts from Martijn van Steenbergen's message of Thu Nov 05 16:54:36 +0100
2009:
Sebastiaan Visser wrote:
myFunc = anotherFunc $ case of
Left err - print err
Right msg - putStrLn msg
A minor syntactical addition, a big win!
+1
If we're counting increments, should add in previous instances of the
same proposal - Andrew Pimlott Sep 2005 on haskell-cafe, at least.
I agree with Stefan Monnier, might as well allow pattern alternatives
in lambda expressions - essentially the same idea and allows multiple
case