The Erlang VM only allows a limited set of expressions as guards:
- comparison operators (
==,!=,===,!==,>,<,<=,>=); - boolean operators (
and,or) and negation operators (not,!); - arithmetic operators (
+,-,*,/); <>and++as long as the left side is a literal;- the
inoperator; - all the following type check functions:
- is_atom/1
- is_binary/1