Liking cljdoc? Tell your friends :D

ribelo.fatum


->clj/smacro

(-> expr & more)

like clojure.core/-> but expr is wrapped in attempt, and the following functions in then

like `clojure.core/->` but `expr` is wrapped in [[attempt]], and the following functions in [[then]]
sourceraw docstring

->>clj/smacro

(->> expr & more)

like clojure.core/->> but expr is wrapped in attempt, and the following functions in then

like `clojure.core/->>` but `expr` is wrapped in [[attempt]], and the following
functions in [[then]]
sourceraw docstring

-if-cljclj/smacro

(-if-clj then & [else])
source

-match-map?clj/s

(-match-map? x m)

chech if x has every kv from m

chech if `x` has every `kv` from `m`
sourceraw docstring

attemptclj/smacro

(attempt & body)

like catching, but takes body as argument

like [[catching]], but takes `body` as argument
sourceraw docstring

callclj/s

(call x f)

attempt to call function f on value x

[[attempt]] to call function `f` on value `x`
sourceraw docstring

catchclj/s

(catch x f)

attempt to call function f on value x if x is fail?

[[attempt]] to call function `f` on value `x` if `x` is [[fail?]]
sourceraw docstring

catch-errorsclj/smacro

(catch-errors & body)

like catching, but returns a vector where the first element is the result of executing the body and the second is an Exception

like [[catching]], but returns a vector where the first element is the result of
executing the `body` and the second is an `Exception`
sourceraw docstring

catch-ifclj/s

(catch-if x pred f)

attempt to call function f on value x if x is fail?, not reduced and meets isa? condition

[[attempt]] to call function `f` on value `x` if `x` is [[fail?]], not
`reduced` and meets [[isa?]] condition
sourceraw docstring

catchingclj/smacro

(catching expr)
(catching expr err catch)
(catching expr err catch finally)

try to execute expr, if catch an error returns it itself

`try` to execute `expr`, if `catch` an error returns it itself
sourceraw docstring

ensure-failclj/s

(ensure-fail x)

ensure that Exception err is Fail

ensure that `Exception` `err` is [[Fail]]
sourceraw docstring

exception-info?clj/s

(exception-info? x)

check if x is ExceptionInfo

check if `x` is `ExceptionInfo`
sourceraw docstring

Failcljs

(Fail msg data)
source

failclj/s

(fail)
(fail msg)
(fail msg data)
(fail msg k v & kvs)

returns Fail

returns [[Fail]]
sourceraw docstring

fail!clj/s

(fail!)
(fail! msg)
(fail! msg data)
(fail! msg k v & kvs)

throw Fail

throw [[Fail]]
sourceraw docstring

fail-ifclj/s

(fail-if x pred)
(fail-if x pred msg)
(fail-if x pred msg data-or-fn)

return fail with optional msg and data if x is ok? and meets isa? condition

return [[fail]] with optional `msg` and `data` if `x` is [[ok?]] and
meets [[isa?]] condition
sourceraw docstring

fail?clj/s

(fail? x)

check if x is instance of Exception or js/Error in cljs

check if `x` is instance of Exception or js/Error in cljs
sourceraw docstring

finallyclj/s

(finally x f)

attempt to call function f on unreduced value of x. return x unchanged and unreduced.

[[attempt]] to call function `f` on `unreduced` value of `x`. return `x`
unchanged and `unreduced`.
sourceraw docstring

if-okclj/smacro

(if-ok test-or-bindings then)
(if-ok test-or-bindings then else)

Like core/if-let but can bind multiple values for then iff all tests are ok?

Like `core/if-let` but can bind multiple values for `then` iff all tests
are `ok?`
sourceraw docstring

isa?clj/s

(isa? x pred)

check if x meets pred, or whether Exception has in ex-data under the key k the value v

check if `x` meets `pred`, or whether `Exception` has in `ex-data` under the
key `k` the value `v`
sourceraw docstring

maybe-throwclj/s

(maybe-throw x)

throw x if x meets fail?

`throw` `x` if `x` meets [[fail?]]
sourceraw docstring

ok?clj/s

(ok? x)

check if x is not Fail

check if `x` is not [[Fail]]
sourceraw docstring

thenclj/s

(then x f)

attempt to call function f on value x if x is ok? and not reduced

[[attempt]] to call function `f` on value `x` if `x` is [[ok?]] and not
`reduced`
sourceraw docstring

then-ifclj/s

(then-if x pred f)

attempt to call function f on value x if x is ok?, not reduced and meets isa? condition

[[attempt]] to call function `f` on value `x` if `x` is [[ok?]], not `reduced`
and meets [[isa?]] condition
sourceraw docstring

throw-ifclj/s

(throw-if x pred)
(throw-if x pred msg-or-fn)
(throw-if x pred msg data)

throw fail! with optional msg and data if x is ok? and meets isa? condition

throw [[fail!]] with optional `msg` and `data` if `x` is [[ok?]] and
meets [[isa?]] condition
sourceraw docstring

thruclj/s

(thru x f)

attempt to call function f on unreduced value of x. return x unchanged. used for side effects

[[attempt]] to call function `f` on `unreduced` value of `x`. return `x`
unchanged. used for side effects
sourceraw docstring

thru-ifclj/s

(thru-if x pred f)

attempt to call function f on unreduced value of x if unreduced x meets isa? condition. return x unchanged. used for side effects

[[attempt]] to call function `f` on `unreduced` value of `x` if `unreduced` `x`
meets [[isa?]] condition. return `x` unchanged. used for side effects
sourceraw docstring

transit-read-handlerscljs

source

transit-write-handlerscljs

source

when-okclj/smacro

(when-ok test-or-bindings & body)

Like clojure.core/when however if first arg is binding vector behave like clojure.core/when-let, but can bind multiple values. check if all tests/bindings are ok?, else return fail

Like `clojure.core/when` however if first arg is binding vector behave like
`clojure.core/when-let`, but can bind multiple values. check if all tests/bindings
are [[ok?]], else return  `fail`
sourceraw docstring

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

× close