Liking cljdoc? Tell your friends :D

better-cond.core

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.
raw docstring

condclj/s≠macro

clj
(cond & clauses)
cljs
(cond &form &env & 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.
source (clj)source (cljs)raw docstring

defncclj/s≠macro

clj
(defnc & defn-args)
cljs
(defnc &form &env & defn-args)

defn with implicit cond

defn with implicit cond
source (clj)source (cljs)raw docstring

defnc-clj/s≠macro

clj
(defnc- & defn-args)
cljs
(defnc- &form &env & defn-args)

defn- with implicit cond

defn- with implicit cond
source (clj)source (cljs)raw docstring

if-letclj/s≠macro

clj
(if-let bindings then)
(if-let bindings then else)
cljs
(if-let &form &env bindings then)
(if-let &form &env 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.
source (clj)source (cljs)raw docstring

if-someclj/s≠macro

clj
(if-some bindings then)
(if-some bindings then else)
cljs
(if-some &form &env bindings then)
(if-some &form &env 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.
source (clj)source (cljs)raw docstring

vec-unformerclj/s

(vec-unformer a)
source (clj)source (cljs)

when-letclj/s≠macro

clj
(when-let bindings & body)
cljs
(when-let &form &env 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.
source (clj)source (cljs)raw docstring

when-someclj/s≠macro

clj
(when-some bindings & body)
cljs
(when-some &form &env 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.
source (clj)source (cljs)raw docstring

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

× close