3.3 Predicates and Logic
procedure
(list? v) → boolean?
v : any
Returns True if v is a list.
Returns True if pred? is true for all elements in xs.
procedure
(null? v) → boolean?
v : any
procedure
(number? v) → boolean?
v : any
Returns True if v is a number.
procedure
(zero? v) → boolean?
v : any
Returns True if v = 0.
procedure
(one? v) → boolean?
v : any
Returns True if v = 1.
procedure
(eq? x y) → boolean?
x : any y : any
Returns True if x and y are the same object.
procedure
(equal? x y) → boolean?
x : any y : any
Returns True if x and y are equal.
procedure
(symbol? v) → boolean?
v : any
procedure
(string? v) → boolean?
v : any
Returns True if v is a string.
procedure
(fn? v) → boolean?
v : any
Returns True if v is a function.
procedure
(atom? v) → boolean?
v : any
Returns True if v is an atom: ie. a number, symbol, or function,
rather than a list or Null.
procedure
(lat? l) → boolean?
l : any
Returns True if l is a list composed solely of atoms.
procedure
(any? v) → boolean?
v : any
Always returns True regardless of value of v.
syntax
(and expr ...)
Returns True only if all given expressions are True.
syntax
(or expr ...)
Returns True if any given expression is True.
procedure
(not v) → boolean?
v : any
Returns True if v is False, else returns False.
syntax
A special keyword for True, used as a literal in conditional statements.
value
True : boolean?
The boolean truth value. Actually an alias for #t in the Racket
implementation. Note that, in Heresy, as in Racket, anything not explicitly
False is considered True.
value
False : boolean?
The boolean false value. Actually an alias for #f in the Racket
implementation.
An alias for the empty list '().