Elm has the equivalent of a Haskell As-Pattern

In Haskell you can write

f x@ (a, b, c) = x 

Does Elm have an equivalent to this?

+6
source share
1 answer

Yes, Elm uses the ML variant of this syntax , which is postfix as name instead of the Haskell name@ prefix:

 f ((a, b, c) as x) = x 
+13
source

All Articles