Skip to content

Commit d0f15af

Browse files
committed
add is_nil to list of guard functions + additional message
1 parent 8cbf4f3 commit d0f15af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: getting-started/case-cond-and-if.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The Erlang Virtual Machine (VM) only allows a limited set of expressions in guar
6969
* `is_integer/1`
7070
* `is_list/1`
7171
* `is_map/1`
72+
* `is_nil/1`
7273
* `is_number/1`
7374
* `is_pid/1`
7475
* `is_port/1`
@@ -92,6 +93,8 @@ The Erlang Virtual Machine (VM) only allows a limited set of expressions in guar
9293
* `trunc(number)`
9394
* `tuple_size(tuple)`
9495

96+
Additionally, modules may define their own guard functions, starting usually with "is_".
97+
9598
Keep in mind errors in guards do not leak but simply make the guard fail:
9699

97100
```iex

0 commit comments

Comments
 (0)