SExpressionCategory(Str, Sym, Int, Flt)¶
sex.spad line 1 [edit on github]
Str: SetCategory
Sym: SetCategory
Int: SetCategory
Flt: SetCategory
This category allows the manipulation of Lisp values while keeping the grunge fairly localized.
- #: % -> Integer
\#((a1, ..., an))
returnsn
.
- atom?: % -> Boolean
atom?(s)
istrue
ifs
is a Lisp atom.
- car: % -> %
car((a1, ..., an))
returnsa1
.
- cdr: % -> %
cdr((a1, ..., an))
returns(a2, ..., an)
.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- convert: Flt -> %
convert(x)
returns the Lisp atomx
.
- convert: Int -> %
convert(x)
returns the Lisp atomx
.
- convert: List % -> %
convert([a1, ..., an])
returns theS
-expression(a1, ..., an)
.
- convert: Str -> %
convert(x)
returns the Lisp atomx
.
- convert: Sym -> %
convert(x)
returns the Lisp atomx
.
- destruct: % -> List %
destruct((a1, ..., an))
returns the list [a1
, …, an].
- elt: (%, Integer) -> %
elt((a1, ..., an), i)
returnsai
.
- elt: (%, List Integer) -> %
elt(s, [i1, ..., im])
recursively selects subexpression, that is elt(s
, []) is justs
and elt(s
, [i1
, …, im]) is the same as elt(elt(s
,i1
), [i2
, …, im]).
- eq: (%, %) -> Boolean
eq(s, t)
istrue
if EQ(s
,t
) istrue
in Lisp.
- float?: % -> Boolean
float?(s)
istrue
ifs
is an atom and belong toFlt
.
- float: % -> Flt
float(s)
returnss
as an element ofFlt
; Error: ifs
is not an atom that also belongs toFlt
.
- hash: % -> SingleInteger
from Hashable
- hashUpdate!: (HashState, %) -> HashState
from Hashable
- integer?: % -> Boolean
integer?(s)
istrue
ifs
is an atom and belong to Int.
- integer: % -> Int
integer(s)
returnss
as an element of Int. Error: ifs
is not an atom that also belongs to Int.
- latex: % -> String
from SetCategory
- list?: % -> Boolean
list?(s)
istrue
ifs
is a Lisp list, possibly ().
- null?: % -> Boolean
null?(s)
istrue
ifs
is theS
-expression ().
- pair?: % -> Boolean
pair?(s)
istrue
ifs
has is a non-null Lisp list.
- string?: % -> Boolean
string?(s)
istrue
ifs
is an atom and belong toStr
.
- string: % -> Str
string(s)
returnss
as an element ofStr
. Error: ifs
is not an atom that also belongs toStr
.
- symbol?: % -> Boolean
symbol?(s)
istrue
ifs
is an atom and belong toSym
.
- symbol: % -> Sym
symbol(s)
returnss
as an element ofSym
. Error: ifs
is not an atom that also belongs toSym
.