(create-stack-machine & {:keys [step-max] :or {step-max default-max-step}})
Create a stack machine suitable for fifql.
Create a stack machine suitable for fifql.
The default maximum execution step before the stack machine will stop executing the query.
The default maximum execution step before the stack machine will stop executing the query.
(get-var sm sym)
Get the value of the variable from the stack-machine sm
defined by
the symbol sym
. Returns nil if the variable does not exist.
Get the value of the variable from the stack-machine `sm` defined by the symbol `sym`. Returns nil if the variable does not exist.
(set-var sm sym value & {:keys [doc group]})
Set the global word variable with the name sym
, with the given
value
.
Set the global word variable with the name `sym`, with the given `value`.
(set-word sm sym f & {:keys [doc group]})
Set the global word defintion with the name sym
, with the stack
function f
.
Set the global word defintion with the name `sym`, with the stack function `f`.
(wrap-function arity f)
Wrap function, f
with given arity
. The function's result is
placed on the stack.
Wrap function, `f` with given `arity`. The function's result is placed on the stack.
(wrap-procedure arity f)
Wrap procedure, f
, with given arity
. The function's result is
not placed on the stack.
Wrap procedure, `f`, with given `arity`. The function's result is *not* placed on the stack.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close