Liking cljdoc? Tell your friends :D

clj-uuid.util


compile-ifcljmacro

(compile-if exp then else)

Evaluate exp and if it returns logical true and doesn't error, expand to then otherwise expand to else.
credit: <clojure/src/clj/clojure/core/reducers.clj#L24>

(compile-if (Class/forName "java.util.concurrent.ForkJoinTask") (do-cool-stuff-with-fork-join) (fall-back-to-executor-services))

Evaluate `exp` and if it returns logical true and doesn't error, expand to
`then` otherwise expand to `else`.  
credit: <clojure/src/clj/clojure/core/reducers.clj#L24>

(compile-if (Class/forName "java.util.concurrent.ForkJoinTask")
  (do-cool-stuff-with-fork-join)
  (fall-back-to-executor-services))
raw docstring

exceptioncljmacro

(exception & [param & more :as params])

indexedclj

(indexed s)

Returns a lazy sequence of [index, item] pairs, where items come from 's' and indexes count up from zero. (indexed '(a b c d)) => ([0 a] [1 b] [2 c] [3 d])

Returns a lazy sequence of [index, item] pairs, where items come
from 's' and indexes count up from zero.
(indexed '(a b c d))  =>  ([0 a] [1 b] [2 c] [3 d])
raw docstring

java6?clj

(java6?)

lines-of-fileclj

(lines-of-file file-name)

returningcljmacro

(returning value & forms)

Compute a return value, then execute other forms for side effects. Like prog1 in common lisp, or a (do) that returns the first form.

Compute a return value, then execute other forms for side effects.
Like prog1 in common lisp, or a (do) that returns the first form.
raw docstring

run-and-measure-timingcljmacro

(run-and-measure-timing expr)

with-temp-filecljmacro

(with-temp-file f-sym & body)

with-timingcljmacro

(with-timing & body)

Same as clojure.core/time but returns a vector of a the result of the code and the milliseconds rather than printing a string. Runs the code in an implicit do.

Same as clojure.core/time but returns a vector of a the result of
the code and the milliseconds rather than printing a string. Runs
the code in an implicit do.
raw docstring

wrap-fncljmacro

(wrap-fn name args & body)

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

× close