sex.spad line 1 [edit on github]
This category allows the manipulation of Lisp values while keeping the grunge fairly localized.
#((a1, ..., an)) returns n.
atom?(s) is true if s is a Lisp atom.
car((a1, ..., an)) returns a1.
cdr((a1, ..., an)) returns (a2, ..., an).
convert(x) returns the Lisp atom x.
convert(x) returns the Lisp atom x.
convert(x) returns the Lisp atom x.
convert(x) returns the Lisp atom x.
convert([a1, ..., an]) returns the S-expression (a1, ..., an).
destruct((a1, ..., an)) returns the list [a1, ..., an].
elt((a1, ..., an), i) returns .ai
elt(s, [i1, ..., im]) recursively selects subexpression, that is elt(s, []) is just s and elt(s, [i1, ..., im]) is the same as elt(elt(s, i1), [i2, ..., im]).
eq(s, t) is true if EQ(s, t) is true in Lisp.
float(s) returns s as an element of Flt; Error: if s is not an atom that also belongs to Flt.
float?(s) is true if s is an atom and belong to Flt.
integer(s) returns s as an element of Int. Error: if s is not an atom that also belongs to Int.
integer?(s) is true if s is an atom and belong to Int.
list?(s) is true if s is a Lisp list, possibly ().
null?(s) is true if s is the S-expression ().
pair?(s) is true if s has is a non-null Lisp list.
string(s) returns s as an element of Str. Error: if s is not an atom that also belongs to Str.
string?(s) is true if s is an atom and belong to Str.
symbol(s) returns s as an element of Sym. Error: if s is not an atom that also belongs to Sym.
symbol?(s) is true if s is an atom and belong to Sym.