• (into to from)
Returns a new coll consisting of to-coll with all of the items of
from-coll conjoined.

2 Examples top

  • ; Adds a list to beginning of another.  Note that elements of list are added in reverse since each is processed sequentially.
    (into '(1 2 3) '(4 5 6))
    
    => (6 5 4 1 2 3)
  • ; Adds a list into an empty list.  Because of the sequential processing, this also essentially produces a reversed version of the original list.
    (into () '(1 2 3 4))
    
    => (4 3 2 1)
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/generic/collection.clj:95 top

(defmulti into
  "Returns a new coll consisting of to-coll with all of the items of
  from-coll conjoined."
   {:arglists '([to from])}
  (fn [to from] (type to)))
Vars in clojure.contrib.generic.collection/into: defmulti fn into type
Used in 0 other vars

Comments top

No comments for into. Log in to add a comment.