Skip to content

Commit

Permalink
Fix typo in Maybe expression documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria-12648430 committed Jul 11, 2024
1 parent 6af5114 commit 3014bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/doc/reference_manual/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ Now let us assume that `a()` returns `error`. The conditional match operator in
the value of the expression that failed to match, namely `error`. Similarly, if
`b()` returns `wrong`, the return value of the `maybe` block is `wrong`.

Finally, let us assume that `a()` returns `-1`. Because `true = A >= 0` uses the
match operator `=`, a `{badmatch,false}` run-time error occurs when the
Finally, let us assume that `a()` returns `{ok,-1}`. Because `true = A >= 0` uses
the match operator `=`, a `{badmatch,false}` run-time error occurs when the
expression fails to match the pattern.

The example can be written in a less succient way using nested case expressions:
Expand Down

0 comments on commit 3014bb8

Please sign in to comment.