(attempt-all bindings return)
(attempt-all bindings return else)
Used like let
, but short-circuits in case of
a failed binding. Can be used in combination with when-failed
to handle the failure.
Unlike let
, only accepts a single form to execute after the bindings.
(attempt-all [x "Ok" y (fail "Fail")] x (when-failed [e] (message e))) ; => "Fail"
Used like `let`, but short-circuits in case of a failed binding. Can be used in combination with when-failed to handle the failure. Unlike `let`, only accepts a single form to execute after the bindings. (attempt-all [x "Ok" y (fail "Fail")] x (when-failed [e] (message e))) ; => "Fail"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close