These keywords reference 'abstract' types that stand in for some concrete data type in the system.
These keywords reference 'abstract' types that stand in for some concrete data type in the system.
(abstract? x)
Returns true if x
is both a Literal
and has a type specified
in abstract-types
, false otherwise.
Returns true if `x` is both a [[Literal]] and has a type specified in [[abstract-types]], false otherwise.
(compare l r)
Compare expressions. The rule is that types have the following ordering:
Any types NOT in this list compare with the other type using hashes.
Compare expressions. The rule is that types have the following ordering: - empty sequence is < anything (except another empty seq) - real < symbol < string < sequence - sequences compare element-by-element Any types NOT in this list compare with the other type using hashes.
(evaluate expr sym->var sym->f)
Walk the unwrapped expression x in postorder, replacing symbols found there with their values in the map environment, if present; the functions association is used for elements in function application position (first of a sequence).
Walk the unwrapped expression x in postorder, replacing symbols found there with their values in the map environment, if present; the functions association is used for elements in function application position (first of a sequence).
(expression-of expr)
If the supplied argument is a Literal
(or a symbol, interpreted elsewhere
as a numerical literal expression), returns the wrapped expression (or the
symbol).
Throws otherwise.
If the supplied argument is a [[Literal]] (or a symbol, interpreted elsewhere as a numerical literal expression), returns the wrapped expression (or the symbol). Throws otherwise.
(fmap f e)
Applies f to the expression part of e and creates from that a Literal otherwise like e.
Applies f to the expression part of e and creates from that a Literal otherwise like e.
(literal-apply type op args)
Similar to make-literal
, but accepts:
Similar to [[clojure.core/apply]].
For example:
(literal-apply ::numeric 'cos [1 2 3]) ;;=> (cos 1 2 3)
Similar to [[make-literal]], but accepts: - some operation - the arguments to which it applies Similar to [[clojure.core/apply]]. For example: (literal-apply ::numeric 'cos [1 2 3]) ;;=> (cos 1 2 3)
(literal-type x)
If x
is a Literal
instance, returns its type. Else, returns nil.
If `x` is a [[Literal]] instance, returns its type. Else, returns nil.
(literal? x)
Returns true if x
is a Literal
instance, false otherwise.
Returns true if `x` is a [[Literal]] instance, false otherwise.
(make-literal type expr)
Constructs a Literal
instance with the supplied type and an empty metadata
map out of the literal form expr
.
Constructs a [[Literal]] instance with the supplied type and an empty metadata map out of the literal form `expr`.
(substitute expr s-map)
(substitute expr old new)
Performs substitutions from the map.
Performs substitutions from the map.
(variables-in expr)
Return the set of 'variables' (e.g. symbols) found in expr
. expr
is either
a symbol, a Literal
instance or some sequence representing a symbolic
expression.
Return the set of 'variables' (e.g. symbols) found in `expr`. `expr` is either a symbol, a [[Literal]] instance or some sequence representing a symbolic expression.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close