Contents
- Example
- Case
- Lambda
- Lambda-case
The LambdaCase
GHC extension introduces a kind of expression that is something of a cross between a case
expression and a lambda expression. A lambda case expression is written using the \case
keyword, which does not exist in standard Haskell.
When we have a combination of a lambda and a case expression that looks like this:
-> case x of {- ... -} \x
we can rewrite slightly more tersely as a lambda-case, like this:
case {- ... -} \
LambdaCase
has been in GHCGHC documentation for LambdaCase
since version 7.6.1.