Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type Predicates

PredicateTests For
is_atom/1Atom
is_binary/1Binary
is_bitstring/1Bitstring
is_boolean/1Boolean (true/false)
is_float/1Float
is_function/1Function
is_function/2Function of specific arity
is_integer/1Integer
is_list/1List
is_map/1Map
is_number/1Number (int or float)
is_pid/1Process identifier
is_port/1Port
is_reference/1Reference
is_tuple/1Tuple

Usage in Guards:

(defun process (x)
  (cond
    ((is_atom x) (process-atom x))
    ((is_list x) (process-list x))
    ((is_tuple x) (process-tuple x))
    ('true 'unknown)))