unisonweb / website

Main Unison website
MIT License
8 stars 5 forks source link

Guard Patterns doc misspelling #74

Open worotyns opened 9 months ago

worotyns commented 9 months ago

In this URL: https://www.unison-lang.org/docs/fundamentals/control-flow/pattern-matching/#guard-patterns

You have in example:

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"