API for cond
- ()
by Stephen C. Gilardi
clojure-contrib is now deprecated
clojure-contrib is no longer being developed or maintained.
Rather than a single, monolithic, contributions library, Clojure now has
a set of separate libraries for each unit of functionality. The libraries
are in the Clojure GitHub organization at
https://github.com/clojure.
API documentation of the libraries can be found at
https://clojure.github.io.
If you're looking for a specific function or namespace from the old
clojure-contrib, see
"Where Did Clojure.Contrib Go".
Full namespace name:
clojure.contrib.cond
Overview
Extensions to the basic cond function.
Public Variables and Functions
cond-let
macro
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (cond-let bindings & clauses)
Takes a binding-form and a set of test/expr pairs. Evaluates each test
one at a time. If a test returns logical true, cond-let evaluates and
returns expr with binding-form bound to the value of test and doesn't
evaluate any of the other tests or exprs. To provide a default value
either provide a literal that evaluates to logical true and is
binding-compatible with binding-form, or use :else as the test and don't
refer to any parts of binding-form in the expr. (cond-let binding-form)
returns nil.
Source