clojure.core.reducers/cat

functionsince v0.0-1236 clojure.core.reducers/catEdit
(cat)
(cat ctor)
(cat left right)

Source docstring:
A high-performance combining fn that yields the catenation of the
reduced values. The result is reducible, foldable, seqable and
counted, providing the identity collections are reducible, seqable
and counted. The single argument version will build a combining fn
with the supplied identity constructor. Tests for identity
with (zero? (count x)). See also foldcat.
Source code @ clojurescript:src/main/cljs/clojure/core/reducers.cljs
(defn cat
  ([] (array))
  ([ctor]
     (fn
       ([] (ctor))
       ([left right] (cat left right))))
  ([left right]
     (cond
       (zero? (count left)) right
       (zero? (count right)) left
       :else
       (Cat. (+ (count left) (count right)) left right))))