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
use Universal
use Text
matchNum : Nat -> Text
matchNum num = match a with
oneTwo | (oneTwo === 1) || (oneTwo === 2) -> "one or two"
threeFour | (threeFour === 3) || (threeFour === 4) -> "three or four"
fiveSix | (fiveSix === 5) || (fiveSix === 6) -> "five or six "
_ -> "no match"
And should not be a, but num.
use Universal
use Text
matchNum : Nat -> Text
matchNum num = match num with
oneTwo | (oneTwo === 1) || (oneTwo === 2) -> "one or two"
threeFour | (threeFour === 3) || (threeFour === 4) -> "three or four"
fiveSix | (fiveSix === 5) || (fiveSix === 6) -> "five or six "
_ -> "no match"
The text was updated successfully, but these errors were encountered:
In this URL:
https://www.unison-lang.org/docs/fundamentals/control-flow/pattern-matching/#guard-patterns
You have in example:
And should not be
a
, butnum
.The text was updated successfully, but these errors were encountered: