A collection of variations on Clojure's core macros. Let's see which features end up being useful.
A collection of variations on Clojure's core macros. Let's see which features end up being useful.
(cond & clauses)
A variation on cond which sports let bindings, do and implicit else: (cond (odd? a) 1 :do (println a) :let [a (quot a 2)] (odd? a) 2 3). Also supports :when-let and :when-some. :let, :when-let, :when-some and :do do not need to be written as keywords.
A variation on cond which sports let bindings, do and implicit else: (cond (odd? a) 1 :do (println a) :let [a (quot a 2)] (odd? a) 2 3). Also supports :when-let and :when-some. :let, :when-let, :when-some and :do do not need to be written as keywords.
(defnc & defn-args)
defn with implicit cond
defn with implicit cond
(defnc- & defn-args)
defn- with implicit cond
defn- with implicit cond
(if-let bindings then)
(if-let bindings then else)
A variation on if-let where all the exprs in the bindings vector must be true. Also supports :let.
A variation on if-let where all the exprs in the bindings vector must be true. Also supports :let.
(if-some bindings then)
(if-some bindings then else)
A variation on if-some where all the exprs in the bindings vector must be non-nil. Also supports :let.
A variation on if-some where all the exprs in the bindings vector must be non-nil. Also supports :let.
(when-let bindings & body)
A variation on when-let where all the exprs in the bindings vector must be true. Also supports :let.
A variation on when-let where all the exprs in the bindings vector must be true. Also supports :let.
(when-some bindings & body)
A variation on when-some where all the exprs in the bindings vector must be non-nil. Also supports :let.
A variation on when-some where all the exprs in the bindings vector must be non-nil. Also supports :let.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close