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"
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
.