familiar.core

fmtstr

(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.

format

(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

non-nil!

(non-nil! x)(non-nil! x message)
Asserts (using `assert`) that `x` is not nil and returns it if it is not.

single!

(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.