x-lang

← Index

x/core/predicates

null?

Test if a value is nil (the empty list).

Parameters:

Returns: BOOL — t if nil

pair?

Test if a value is a pair (cons cell).

Parameters:

Returns: BOOL — t if pair

not

Logical negation.

Parameters:

Returns: BOOL — t if x is falsy

atom?

Test if a value is an atom (not a pair).

Parameters:

Returns: BOOL — t if not a pair

number?

Test if a value is an integer.

Parameters:

Returns: BOOL — t if integer

str?

Test if a value is a string.

Parameters:

Returns: BOOL — t if string

symbol?

Test if a value is a symbol.

Parameters:

Returns: BOOL — t if symbol

char?

Test if a value is a character.

Parameters:

Returns: BOOL — t if character

procedure?

Test if a value is callable (procedure or primitive).

Parameters:

Returns: BOOL — t if procedure or primitive

operative?