Guard Patterns doc misspelling
Open
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the Guard Patterns section at the linked URL and inspect the matchNum example. Change the match expression to use the function parameter num instead of the undefined name a, then verify that the displayed example matches the corrected snippet in the issue.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100