
5 Nov
2009
5 Nov
'09
10:59 a.m.
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 {})'.
So we could write:
myFunc = anotherFunc $ case of Left err -> print err Right msg -> putStrLn msg
A minor syntactical addition, a big win!
Since this "case" really defines a function, it seems like it would make more sense to allow defining anonymous functions by pattern matching. I.e. instead of "case of", I think it should use "λ", "\", "fn", or ... Stefan