Skip to content

Commit 93463c0

Browse files
committed
Clarify that underscore would match if it were reached in execution.
In the first example for `case`, we learn that underscore "would match any value". It's then confusing to read in the third example that underscore "won't match". While this is technically true in the example as written, (since x>0, the first pattern will match,) it's not consistent with the earlier statement.
1 parent 01275ee commit 93463c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getting-started/case-cond-and-if.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ iex> case {1, 2, 3} do
4545
...> {1, x, 3} when x > 0 ->
4646
...> "Will match"
4747
...> _ ->
48-
...> "Won't match"
48+
...> "Would match, if guard condition were not satisfied"
4949
...> end
5050
"Will match"
5151
```

0 commit comments

Comments
 (0)