(amb & exprs)
Syntax :
(amb table1 table2 ,,, tableN)
Returns the concatenation of table1 table2 ,,, tableN
.
Syntax : ```clojure (amb table1 table2 ,,, tableN) ``` Returns the concatenation of `table1 table2 ,,, tableN`.
(as-vec expr)
Syntax :
(as-vec table)
Returns a single vector containing elements of table
.
Syntax : ```clojure (as-vec table) ``` Returns a single vector containing elements of `table`.
(capture-fn)
Captures variability of a function under a stable identity. Return a proxy to the captured function. Use case: prevent unmount and remount when a cc/fn argument updates due to an inner variable dependency.
Captures variability of a function under a stable identity. Return a proxy to the captured function. Use case: prevent unmount and remount when a cc/fn argument updates due to an inner variable dependency.
(diff-by f xs)
Syntax :
(diff-by kf xs)
Stabilizes successive states of collection xs
with function kf
. Returns each item as a table.
Syntax : ```clojure (diff-by kf xs) ``` Stabilizes successive states of collection `xs` with function `kf`. Returns each item as a table.
(drain expr)
Syntax :
(drain expr)
Samples and discards expr
synchronously with changes. Returns nothing.
Syntax : ```clojure (drain expr) ``` Samples and discards `expr` synchronously with changes. Returns nothing.
(for bindings & body)
Syntax :
(for [sym1 table1
sym2 table2
,,, ,,,
symN tableN]
& body)
For each tuple in the cartesian product of table1 table2 ,,, tableN
, calls body in an implicit do
with symbols
sym1 sym2 ,,, symN
bound to the singleton tables for this tuple. Returns the concatenation of all body results.
Syntax : ```clojure (for [sym1 table1 sym2 table2 ,,, ,,, symN tableN] & body) ``` For each tuple in the cartesian product of `table1 table2 ,,, tableN`, calls body in an implicit `do` with symbols `sym1 sym2 ,,, symN` bound to the singleton tables for this tuple. Returns the concatenation of all body results.
(for-by kf bindings & body)
Syntax :
(for-by kf [sym1 coll1
sym2 coll2
,,, ,,,
symN collN]
& body)
Stabilizes successives states of coll1 coll2 ,,, collN
with function kf
. For each tuple in the cartesian product of
resulting tables, calls body in an implicit do
with symbols sym1 sym2 ,,, symN
bound to the singleton tables for
this tuple. Returns the concatenation of all body results as a single vector.
Syntax : ```clojure (for-by kf [sym1 coll1 sym2 coll2 ,,, ,,, symN collN] & body) ``` Stabilizes successives states of `coll1 coll2 ,,, collN` with function `kf`. For each tuple in the cartesian product of resulting tables, calls body in an implicit `do` with symbols `sym1 sym2 ,,, symN` bound to the singleton tables for this tuple. Returns the concatenation of all body results as a single vector.
Bound to the HTTP request of the page in which the current Electric program is running.
Bound to the HTTP request of the page in which the current Electric program is running.
(input & flows)
Syntax :
(input cf)
Returns the current state of current continuous flow cf
.
Syntax : ```clojure (input cf) ``` Returns the current state of current continuous flow `cf`.
(join flow)
Syntax :
(join incseq)
Returns the successive states of items described by incseq
.
Syntax : ```clojure (join incseq) ``` Returns the successive states of items described by `incseq`.
(mount-point)
Returns a new mount point instance. A mount point can be :
Returns a new mount point instance. A mount point can be : * mutated as a key-value store via the KVS protocol. Keys must be tags generated by the same electric application. * watched as an incremental sequence. Values will be sorted according to the relative ordering of tags.
(on-unmount f)
Run clojure(script) thunk f
during unmount.
Standard electric code runs on mount, therefore there is no on-mount
.
Run clojure(script) thunk `f` during unmount. Standard electric code runs on mount, therefore there is no `on-mount`.
(Partial F)
(Partial F arg1)
(Partial F arg1 arg2)
(Partial F arg1 arg2 arg3)
(Partial F arg1 arg2 arg3 & more)
Takes an Electric function F and fewer than the normal arguments to F, and returns a e/fn that takes a variable number of additional args. When called, the returned function calls F with args + additional args.
Takes an Electric function F and fewer than the normal arguments to F, and returns a e/fn that takes a variable number of additional args. When called, the returned function calls F with args + additional args.
(pure expr)
Syntax :
(pure table)
Returns the incremental sequence describing table
.
Syntax : ```clojure (pure table) ``` Returns the incremental sequence describing `table`.
(snapshot x)
Snapshots the first non-Pending value of reactive value x
and freezes it,
inhibiting all further reactive updates.
Snapshots the first non-Pending value of reactive value `x` and freezes it, inhibiting all further reactive updates.
(watch ref)
Syntax :
(watch !ref)
Returns the current state of current reference !ref
.
Syntax : ```clojure (watch !ref) ``` Returns the current state of current reference `!ref`.
(with-cycle [s i] & body)
evaluates body with symbol s bound to the previous result of the body evaluation. the first evaluation binds s to i.
evaluates body with symbol s bound to the previous result of the body evaluation. the first evaluation binds s to i.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close