InputFormΒΆ

mkfunc.spad line 1 [edit on github]

Domain of parsed forms which can be passed to the interpreter. This is also the interface between algebra code and facilities in the interpreter.

0: %

0 returns the input form corresponding to 0.

1: %

1 returns the input form corresponding to 1.

#: % -> Integer

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

*: (%, %) -> %

a * b returns the input form corresponding to a * b.

+: (%, %) -> %

a + b returns the input form corresponding to a + b.

/: (%, %) -> %

a / b returns the input form corresponding to a / b.

=: (%, %) -> Boolean

from BasicType

^: (%, Integer) -> %

a ^ b returns the input form corresponding to a ^ b.

^: (%, NonNegativeInteger) -> %

a ^ b returns the input form corresponding to a ^ b.

~=: (%, %) -> Boolean

from BasicType

atom?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

binary: (%, List %) -> %

binary(op, [a1, ..., an]) returns the input form corresponding to a1 op a2 op ... op an.

car: % -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

cdr: % -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

coerce: % -> OutputForm

from CoercibleTo OutputForm

compile: (Symbol, List %) -> Symbol

compile(f, [t1, ..., tn]) forces the interpreter to compile the function f with signature (t1, ..., tn) -> ?. returns the symbol f if successful. Error: if f was not defined beforehand in the interpreter, or if the ti's are not valid types, or if the compiler fails.

convert: % -> SExpression

from ConvertibleTo SExpression

convert: DoubleFloat -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

convert: Integer -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

convert: List % -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

convert: SExpression -> %

convert(s) makes s into an input form.

convert: String -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

convert: Symbol -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

declare: List % -> Symbol

declare(t) returns a name f such that f has been declared to the interpreter to be of type t, but has not been assigned a value yet. Note: t should be created as devaluate(T)\$Lisp where T is the actual type of f (this hack is required for the case where T is a mapping type).

destruct: % -> List %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

elt: (%, Integer) -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

elt: (%, List Integer) -> %

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

eq: (%, %) -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

flatten: % -> %

flatten(s) returns an input form corresponding to s with all the nested operations flattened to triples using new local variables. If s is a piece of code, this speeds up the compilation tremendously later on.

float?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

float: % -> DoubleFloat

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

function: (%, List Symbol, Symbol) -> %

function(code, [x1, ..., xn], f) returns the input form corresponding to f(x1, ..., xn) == code.

hash: % -> SingleInteger

from SetCategory

hashUpdate!: (HashState, %) -> HashState

from SetCategory

integer?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

integer: % -> Integer

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

interpret: % -> Any

interpret(f) passes f to the interpreter.

lambda: (%, List Symbol) -> %

lambda(code, [x1, ..., xn]) returns the input form corresponding to (x1, ..., xn) +-> code if n > 1, or to x1 +-> code if n = 1.

latex: % -> String

from SetCategory

list?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

null?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

pair?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

parse: String -> %

parse(s) is the inverse of unparse. It parses a string to InputForm

string?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

string: % -> String

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

symbol?: % -> Boolean

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

symbol: % -> Symbol

from SExpressionCategory(String, Symbol, Integer, DoubleFloat)

unparse: % -> String

unparse(f) returns a string s such that the parser would transform s to f. Error: if f is not the parsed form of a string.

BasicType

CoercibleTo OutputForm

ConvertibleTo SExpression

SetCategory

SExpressionCategory(String, Symbol, Integer, DoubleFloat)