You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the only way to extract elements from a tuple is with positional selectors (x.0, etc.). It would be nice to allow pattern matching syntax, too, so you could do, for instance:
let f (x, y) = ...
or
(a, b) <- ...
and so on.
The text was updated successfully, but these errors were encountered:
In saw-script, we now support tuple patterns in lambdas, monadic
bind statements (also at the REPL), and function declarations:
\(x, y) -> e
(x, y) <- e
let f (x, y) = e
This mostly takes care of issue #99. However, this patch does not
include support for pattern bindings in declarations:
let (x, y) = e -- unsupported
Commit 46c4fc4 adds support for the forms of tuple binders mentioned above, as well as lambda binders like \(x, y) -> e. Support for declarations with pattern bindings like let (a, b) = ... is still missing, though. I'll close the ticket once I've implemented that as well.
Right now, the only way to extract elements from a tuple is with positional selectors (
x.0
, etc.). It would be nice to allow pattern matching syntax, too, so you could do, for instance:or
and so on.
The text was updated successfully, but these errors were encountered: