(err)
(err x)
Returns value as Error.
=> (type (err "foo")) merr.core.MerrError
=> @(err "foo") "foo"
Returns value as Error. => (type (err "foo")) merr.core.MerrError => @(err "foo") "foo"
(err? x)
Returns true if x is Error.
=> (err? "foo") false
=> (err? (err "foo")) true
Returns true if x is Error. => (err? "foo") false => (err? (err "foo")) true
(let err-sym bindings & body)
binding => binding-form init-expr If init-expr is not Error, binding-form bound to the value, if not, err-sym bound to the Error value and rest bindings are skipped.
=> (let +err+ [a 1 => b (inc a)] => [b +err+]) [2 nil]
=> (let +err+ [a (err "ERR") => b (inc a)] => [b (err? +err+)]) [nil true]
binding => binding-form init-expr If init-expr is not Error, binding-form bound to the value, if not, err-sym bound to the Error value and rest bindings are skipped. => (let +err+ [a 1 => b (inc a)] => [b +err+]) [2 nil] => (let +err+ [a (err "ERR") => b (inc a)] => [b (err? +err+)]) [nil true]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close