(condp-case predicate value & cases)
A variant of condp which has case-like syntax for options. When comparing smaller numbers of keywords, this can be faster, sometimes significantly.
A variant of condp which has case-like syntax for options. When comparing smaller numbers of keywords, this can be faster, sometimes significantly.
(def-abstract-type name & body)
An abstract type, which can be used in conjunction with deftype+.
An abstract type, which can be used in conjunction with deftype+.
(def-derived-map name params & {:as m})
Allows a map type to be defined where key-value pairs may be derived from fields.
For instance, if we want to create a map which contains both upper and lower-case versions of a string without immediately instantiating both, we can do this:
(def-derived-map StringMap [^String s] :lower-case (.toLowerCase s) :upper-case (.toUpperCase s))
The resulting map will behave correctly if the defined keys are removed, shadowed, etc.
The above class will automatically create a constructor named '->StringMap'.
Allows a map type to be defined where key-value pairs may be derived from fields. For instance, if we want to create a map which contains both upper and lower-case versions of a string without immediately instantiating both, we can do this: (def-derived-map StringMap [^String s] :lower-case (.toLowerCase s) :upper-case (.toUpperCase s)) The resulting map will behave correctly if the defined keys are removed, shadowed, etc. The above class will automatically create a constructor named '->StringMap'.
(def-map-type name params & body)
Like deftype, but must contain definitions for the following functions:
(get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this]) (meta [this]) (with-meta [this meta])
All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.
Like deftype, but must contain definitions for the following functions: (get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this]) (meta [this]) (with-meta [this meta]) All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.
(definterface+ name & body)
An interface that won't evaluate if an interface with that name already exists.
Self parameters and multiple arities are defined like defprotocol, as well as wrapping functions for each, so it can be used to replace defprotocol seamlessly.
An interface that won't evaluate if an interface with that name already exists. Self parameters and multiple arities are defined like defprotocol, as well as wrapping functions for each, so it can be used to replace defprotocol seamlessly.
(defprotocol+ name & body)
A protocol that won't evaluate if an equivalent protocol with the same name already exists.
A protocol that won't evaluate if an equivalent protocol with the same name already exists.
(defrecord+ name & body)
A defrecord that won't evaluate if an equivalent datatype with the same name already exists.
A defrecord that won't evaluate if an equivalent datatype with the same name already exists.
(deftype+ name params & body)
A deftype that won't evaluate if an equivalent datatype with the same name already exists, and allows abstract types to be used.
A deftype that won't evaluate if an equivalent datatype with the same name already exists, and allows abstract types to be used.
(doary [x ary] & body)
An array-specific version of doseq.
An array-specific version of doseq.
(doit [x it] & body)
A version of doseq that doesn't emit all that inline-destroying chunked-seq code.
A version of doseq that doesn't emit all that inline-destroying chunked-seq code.
(equivalent? a b)
(extend-protocol+ proto & body)
A variant of extend-protocol
that allows proto
to be extended over other protocols, as well as classes and nil
.
A variant of `extend-protocol` that allows `proto` to be extended over other protocols, as well as classes and `nil`.
(fast-bound-fn & fn-body)
Creates a variant of bound-fn which doesn't assume you want a merged context between the source and execution environments.
Creates a variant of bound-fn which doesn't assume you want a merged context between the source and execution environments.
(fast-bound-fn* f)
Creates a function which conveys bindings, via fast-bound-fn.
Creates a function which conveys bindings, via fast-bound-fn.
(fast-memoize f)
A version of memoize
which has equivalent behavior, but is faster.
A version of `memoize` which has equivalent behavior, but is faster.
(import-def sym)
(import-def sym name)
Given a regular def'd var from another namespace, defined a new var with the same name in the current namespace.
Given a regular def'd var from another namespace, defined a new var with the same name in the current namespace.
(import-fn sym)
(import-fn sym name)
Given a function in another namespace, defines a function with the same name in the current namespace. Argument lists, doc-strings, and original line-numbers are preserved.
Given a function in another namespace, defines a function with the same name in the current namespace. Argument lists, doc-strings, and original line-numbers are preserved.
(import-macro sym)
(import-macro sym name)
Given a macro in another namespace, defines a macro with the same name in the current namespace. Argument lists, doc-strings, and original line-numbers are preserved.
Given a macro in another namespace, defines a macro with the same name in the current namespace. Argument lists, doc-strings, and original line-numbers are preserved.
(import-vars & syms)
Imports a list of vars from other namespaces.
Imports a list of vars from other namespaces.
(normalize-gensyms body)
(reify+ & body)
A reify that supports abstract types.
A reify that supports abstract types.
(reify-map-type & body)
Like reify, but must contain definitions for the following functions:
(get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this])
All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.
Like reify, but must contain definitions for the following functions: (get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this]) All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.
(try* & body+catch)
A variant of try that is fully transparent to transaction retry exceptions
A variant of try that is fully transparent to transaction retry exceptions
(unify-gensyms body)
All gensyms defined using two hash symbols are unified to the same value, even if they were defined within different syntax-quote scopes.
All gensyms defined using two hash symbols are unified to the same value, even if they were defined within different syntax-quote scopes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close