Call to arms: lambda-case is stuck and needs your help
Donn Cave
donn at avvanta.com
Fri Jul 6 00:47:35 CEST 2012
The `multi-clause lambda' seems more elegant, if the syntactical
problems could be worked out. I mean, unnamed functions are thus
just like named functions, something that you'd probably think to
try just as soon as you needed the feature.
I don't understand the issues well enough with the layout rules to
comment on Tyson Whitehead's ideas about that, and for the same
reason this may be a useless idea, but what if each clause were
introduced by \, would that clarify the column structure, or does
indented block structure require a less-indented `layout herald'?
f = \ (Just a) (Just b) | a < 0 || b < 0 -> Nothing
\ (Just a) (Just b) -> Just (a * b)
\ _ _ -> Nothing
Donn
More information about the Glasgow-haskell-users
mailing list