Constructors for CVX cells and related type predicate functions.
Also constructors for a few common idioms such as creating a def
form.
Constructors for CVX cells and related type predicate functions. Also constructors for a few common idioms such as creating a [[def]] form.
(address long)
Creates a CVX address from a long.
Creates a CVX address from a long.
(blob byte-array)
Creates a CVX blob from a byte array.
Creates a CVX blob from a byte array.
(boolean x)
Creates a CVX boolean given a falsy or truthy value.
Creates a CVX boolean given a falsy or truthy value.
(byte b)
Creates a CVX byte from a value between 0 and 255 inclusive.
Creates a CVX byte from a value between 0 and 255 inclusive.
(call? x form)
Is x
a call for form
such as (form ...)
?
Is `x` a call for `form` such as `(form ...)`?
(char ch)
Creates a CVX character from a regular character.
Creates a CVX character from a regular character.
(code-std* kw)
Given a Clojure keyword, returns the corresponding standard error code (any of the Convex keyword the CVM itself uses):
:ARGUMENT
:ARITY
:ASSERT
:BOUNDS
:CAST
:COMPILE
:DEPTH
:EXCEPTION
:EXPAND
:FATAL
:FUNDS
:HALT
:JUICE
:MEMORY
:NOBODY
:RECUR
:REDUCED
:RETURN
:ROLLBACK
:SEQUENCE
:SIGNATURE
:STATE
:TAILCALL
:TODO
:TRUST
:UNDECLARED
:UNEXPECTED
Throws if keyword does not match any of those.
Note that in user functions, codes can be anything, any type, using those codes is not at all mandatory.
Given a Clojure keyword, returns the corresponding standard error code (any of the Convex keyword the CVM itself uses): - `:ARGUMENT` - `:ARITY` - `:ASSERT` - `:BOUNDS` - `:CAST` - `:COMPILE` - `:DEPTH` - `:EXCEPTION` - `:EXPAND` - `:FATAL` - `:FUNDS` - `:HALT` - `:JUICE` - `:MEMORY` - `:NOBODY` - `:RECUR` - `:REDUCED` - `:RETURN` - `:ROLLBACK` - `:SEQUENCE` - `:SIGNATURE` - `:STATE` - `:TAILCALL` - `:TODO` - `:TRUST` - `:UNDECLARED` - `:UNEXPECTED` Throws if keyword does not match any of those. Note that in user functions, codes can be anything, any type, using those codes is not at all mandatory.
(def sym x)
Creates a def
form which interns x
under sym
.
Creates a `def` form which interns `x` under `sym`.
(deploy code)
(deploy sym code)
Creates a deploy
form which deploys code
.
If sym
is provided, the deploy form is embedded in a def
.
Creates a `deploy` form which deploys `code`. If `sym` is provided, the deploy form is embedded in a [[def]].
(do cell+)
Creates a do
form embedded the given cells.
Creates a `do` form embedded the given cells.
(error message)
(error code message)
(error code message trace)
An error value as Convex data.
code
is often a CVX keyword (:ASSERT
by default), message
could be any CVX value (albeit often a human-readable
string), and trace
is an optional stacktrace (CVX vector of CVX strings).
An error value as Convex data. `code` is often a CVX keyword (`:ASSERT` by default), `message` could be any CVX value (albeit often a human-readable string), and `trace` is an optional stacktrace (CVX vector of CVX strings).
(import x as)
Creates an import
form which imports x
as as
.
Creates an `import` form which imports `x` as `as`.
Zeroed key
that can be used during dev and testing so that an account is considered as a user, not an actor.
Zeroed [[key]] that can be used during dev and testing so that an account is considered as a user, not an actor.
(keyword string)
Creates a CVX keyword from a string.
Creates a CVX keyword from a string.
(list)
(list x)
Creates a CVX list from a collection of CVX items.
Creates a CVX list from a collection of CVX items.
(map)
(map x)
Creates a CVX map from a collection of [key value]
.
Creates a CVX map from a collection of `[key value]`.
(set)
(set x)
Creates a CVX set from a collection of CVX items.
Creates a CVX set from a collection of CVX items.
(string string)
Creates a CVX string from a regular string.
Creates a CVX string from a regular string.
(symbol string)
Creates a CVX symbol from a string.
Creates a CVX symbol from a string.
(vector)
(vector x)
Creates a CVX vector from a collection of CVX items.
Creates a CVX vector from a collection of CVX items.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close