Skip to content

Commit

Permalink
Merge pull request #8658 from Maria-12648430/fix_maybe_doc
Browse files Browse the repository at this point in the history
Fix typo in `maybe` expression documentation
  • Loading branch information
jhogberg authored Jul 15, 2024
2 parents 0a984b7 + 3014bb8 commit 11d6f1f
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 11d6f1f

Please sign in to comment.