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
Support non-nestable OR patterns without bindings such as:
str match {
"YES"|"NO"=> ...
_ => ...
}
car match {
caseCar("Mercedes-Benz", _) |Car("smart", _) => ...
_ =>
}
people match {
caseCons("Joe", Nil()) |Cons("Jolene", Nil()) => ...
...
}
only on the top-level (no nesting) and for patterns without bindings (those should be rejected).
This way, we get the 80% of use cases with 20% of the work of implementing actual nested OR patterns with bindings.
Then this change should be somewhat simple to add, just duplicating the branches.
The text was updated successfully, but these errors were encountered:
Support non-nestable OR patterns without bindings such as:
only on the top-level (no nesting) and for patterns without bindings (those should be rejected).
This way, we get the 80% of use cases with 20% of the work of implementing actual nested OR patterns with bindings.
Then this change should be somewhat simple to add, just duplicating the branches.
The text was updated successfully, but these errors were encountered: