Liking cljdoc? Tell your friends :D
Clojure only.

retroact.helpers


constcljmacro

(const expr)

Create an inline constant that will return the exact reference/value every time. This is useful in render fns that call object constructors such as (Color. 100 100 100). When placing this code inside const, it will become a constant such that = will return true. (defn get-const [] (const (Color. 100 100 100))) makes (= (get-const) (get-const)) true.

Create an inline constant that will return the exact reference/value every time. This is useful in render fns that
call object constructors such as `(Color. 100 100 100)`. When placing this code inside `const`, it will become a
constant such that `=` will return true. `(defn get-const [] (const (Color. 100 100 100)))` makes
`(= (get-const) (get-const))` true.
raw docstring

const-namedcljmacro

(const-named name expr)

Where const generates a random symbol name, const-named takes the symbol name as an argument in name. This is useful for debugging and stack traces.

Where `const` generates a random symbol name, `const-named` takes the symbol name as an argument in `name`. This is
useful for debugging and stack traces.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close