Liking cljdoc? Tell your friends :D

familiar.core


fmtstrclj/s

(fmtstr format-in & args)

Provides a marginally more convenient form of clojure.pprint/cl-format by not requiring a writer to be specified when a formatted string is all that is needed.

Provides a marginally more convenient form of `clojure.pprint/cl-format` by
not requiring a writer to be specified when a formatted string is all that
is needed.
sourceraw docstring

formatclj/s

(format writer format-in & args)

Replaces clojure.core/format with clojure.pprint/cl-format. Takes the same arguments as cl-format. See: https://clojure.github.io/clojure/clojure.pprint-api.html#clojure.pprint/cl-format

Replaces `clojure.core/format` with `clojure.pprint/cl-format`.  Takes the
same arguments as `cl-format`.
See: https://clojure.github.io/clojure/clojure.pprint-api.html#clojure.pprint/cl-format
sourceraw docstring

non-nil!clj/s

(non-nil! x)
(non-nil! x message)

Asserts (using assert) that x is not nil and returns it if it is not.

Asserts (using `assert`) that `x` is not nil and returns it if it is not.
sourceraw docstring

single!clj/s

(single! coll)
(single! coll msg)
(single! coll empty-msg many-msg)

Asserts (using assert) that coll contains only a single element; does not realise lazy sequences.

The multi-arity versions of the functions allow additional context to be added to the assertion message; in the arity 2 case msg is appended to the default assertion msg, while in the arity 3 case empty-msg and many-msg replace the default assertion message for collections with <1 and >1 elements respectively.

Asserts (using `assert`) that `coll` contains only a single element; does
not realise lazy sequences.

The multi-arity versions of the functions allow additional context to be
added to the assertion message; in the arity 2 case `msg` is appended to
the default assertion msg, while in the arity 3 case `empty-msg` and
`many-msg` *replace* the default assertion message for collections with
<1 and >1 elements respectively.
sourceraw docstring

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

× close