concat

functionsince v0.0-927 clojure.core/concatEdit
(concat)
(concat x)
(concat x y)
(concat x y & zs)

Details:

Returns a lazy sequence representing the concatenation of the elements in the supplied collections.


Examples:

(concat (list 1 2 3) (list 4 5 6))
;;=> (1 2 3 4 5 6)

(concat [1 2 3] (list 4 5 6))
;; => (1 2 3 4 5 6)

(concat [1] [2] [3])
;; => (1 2 3)

See Also:


Source docstring:
Returns a lazy seq representing the concatenation of the elements in the supplied colls.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn concat
  ([] (lazy-seq nil))
  ([x] (lazy-seq x))
  ([x y]
    (lazy-seq
      (let [s (seq x)]
        (if s
          (if (chunked-seq? s)
            (chunk-cons (chunk-first s) (concat (chunk-rest s) y))
            (cons (first s) (concat (rest s) y)))
          y))))
  ([x y & zs]
     (let [cat (fn cat [xys zs]
                 (lazy-seq
                   (let [xys (seq xys)]
                     (if xys
                       (if (chunked-seq? xys)
                         (chunk-cons (chunk-first xys)
                                     (cat (chunk-rest xys) zs))
                         (cons (first xys) (cat (rest xys) zs)))
                       (when zs
                         (cat (first zs) (next zs)))))))]
       (cat (concat x y) zs))))