Ascending comparator fn. Equivalent to clojure.core/compare
Ascending comparator fn. Equivalent to clojure.core/compare
(assert-val expr msg)
Assert and returns the value of expr
Assert and returns the value of `expr`
(chain-fx! a f)
Given an atom a
and a function f
that accepts one argument, it will swap! a new delay
onto a
that calls f
with (force current-atom-val)
as argument. Then, forces the new swapped-in delay.
Useful to chain
side-effects inside an atom.
Given an atom `a` and a function `f` that accepts one argument, it will swap! a new `delay` onto `a` that calls `f` with `(force current-atom-val)` as argument. Then, forces the new swapped-in delay. Useful to `chain` side-effects inside an atom.
Descending comparator fn, inverts clojure.core/compare
Descending comparator fn, inverts clojure.core/compare
(invert-comparator cmp)
Inverts the given comparator cmp
, returning a new comparator fn
Inverts the given comparator `cmp`, returning a new comparator fn
(while-let bindings & body)
Like clojure.core/while but accepts a vector of bindings as first expr. Only when all bindings are logical true the body executes and recurs back into the while.
Supports multiple bindings and intermediary unconditional :let
Like clojure.core/while but accepts a vector of bindings as first expr. Only when all bindings are logical true the body executes and recurs back into the while. Supports multiple bindings and intermediary unconditional :let
(while-some bindings & body)
Like clojure.core/while but accepts a vector of bindings as first expr. Only when all bindings are non-nil the body executes and recurs back into the while.
Supports multiple bindings and intermediary unconditional :let
E.g consume a core.async/chan
(while-some [v (<! ch)] ...)
Like clojure.core/while but accepts a vector of bindings as first expr. Only when all bindings are non-nil the body executes and recurs back into the while. Supports multiple bindings and intermediary unconditional :let E.g consume a core.async/chan ``` (while-some [v (<! ch)] ...) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close