SExpressionCategory(Str, Sym, Int, Flt)

sex.spad line 1 [edit on github]

This category allows the manipulation of Lisp values while keeping the grunge fairly localized.

# : % -> Integer

#((a1, ..., an)) returns n.

= : (%, %) -> Boolean
from BasicType
atom? : % -> Boolean

atom?(s) is true if s is a Lisp atom.

car : % -> %

car((a1, ..., an)) returns a1.

cdr : % -> %

cdr((a1, ..., an)) returns (a2, ..., an).

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
convert : Flt -> %

convert(x) returns the Lisp atom x.

convert : Int -> %

convert(x) returns the Lisp atom x.

convert : Str -> %

convert(x) returns the Lisp atom x.

convert : Sym -> %

convert(x) returns the Lisp atom x.

convert : List(%) -> %

convert([a1, ..., an]) returns the S-expression (a1, ..., an).

destruct : % -> List(%)

destruct((a1, ..., an)) returns the list [a1, ..., an].

elt : (%, Integer) -> %

elt((a1, ..., an), i) returns ai.

elt : (%, List(Integer)) -> %

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 : (%, %) -> Boolean

eq(s, t) is true if EQ(s, t) is true in Lisp.

float : % -> Flt

float(s) returns s as an element of Flt; Error: if s is not an atom that also belongs to Flt.

float? : % -> Boolean

float?(s) is true if s is an atom and belong to Flt.

hash : % -> SingleInteger
from Hashable
hashUpdate! : (HashState, %) -> HashState
from Hashable
integer : % -> Int

integer(s) returns s as an element of Int. Error: if s is not an atom that also belongs to Int.

integer? : % -> Boolean

integer?(s) is true if s is an atom and belong to Int.

latex : % -> String
from SetCategory
list? : % -> Boolean

list?(s) is true if s is a Lisp list, possibly ().

null? : % -> Boolean

null?(s) is true if s is the S-expression ().

pair? : % -> Boolean

pair?(s) is true if s has is a non-null Lisp list.

string : % -> Str

string(s) returns s as an element of Str. Error: if s is not an atom that also belongs to Str.

string? : % -> Boolean

string?(s) is true if s is an atom and belong to Str.

symbol : % -> Sym

symbol(s) returns s as an element of Sym. Error: if s is not an atom that also belongs to Sym.

symbol? : % -> Boolean

symbol?(s) is true if s is an atom and belong to Sym.

~= : (%, %) -> Boolean
from BasicType

CoercibleTo(OutputForm)

Hashable

SetCategory

BasicType