Liking cljdoc? Tell your friends :D

bortexz.utils.core


ascending-comparatorclj

Ascending comparator fn. Equivalent to clojure.core/compare

Ascending comparator fn. Equivalent to clojure.core/compare
sourceraw docstring

assert-valcljmacro

(assert-val expr msg)

Assert and returns the value of expr

Assert and returns the value of `expr`
sourceraw docstring

chain-fx!clj

(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.
sourceraw docstring

chain-fx-vals!clj

(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>)]
sourceraw docstring

descending-comparatorclj

Descending comparator fn, inverts clojure.core/compare

Descending comparator fn, inverts clojure.core/compare
sourceraw docstring

exception?clj

(exception? x)
source

invert-comparatorclj

(invert-comparator cmp)

Inverts the given comparator cmp, returning a new comparator fn

Inverts the given comparator `cmp`, returning a new comparator fn
sourceraw docstring

set-uncaught-exception-handler!clj

(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
sourceraw docstring

throwable?clj

(throwable? x)
source

uncaught-exceptionclj

(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.
sourceraw docstring

while-letcljmacro

(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
sourceraw docstring

while-somecljmacro

(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)] ...)
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close