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.
(chain-fx-vals! a f)
Like chain-fx!
but returns [(force <old val>) (force <new val>)]
Like [[chain-fx!]] but returns [(force <old val>) (force <new val>)]
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
(set-uncaught-exception-handler! ex-handler)
Configures uncaught exception handler to ex-handler
, 2-arity fn that will be called with the thread
and the exception thrown when an uncaught exception happens.
See: https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions
Configures uncaught exception handler to `ex-handler`, 2-arity fn that will be called with the thread and the exception thrown when an uncaught exception happens. See: https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions
(uncaught-exception ex)
Calls current thread's uncaught exception handler with exception ex
. Returns nil.
Calls current thread's uncaught exception handler with exception `ex`. Returns nil.
(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