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

3 Examples top

  • user=> (into {} [[1 2] [3 4]])
    {1 2, 3 4}
    user=> (into [] {1 2, 3 4})
    [[1 2] [3 4]]
  • user=> (into () '(1 2 3))
    (3 2 1)
    
  • (defn test-key-inclusion-cols
      "return all values in column1 that arent' in column2"
      [column1 column2]
      (filter (complement (into #{} column2)) column1))
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:5997 top

(defn into
  "Returns a new coll consisting of to-coll with all of the items of
  from-coll conjoined."
  {:added "1.0"
   :static true}
  [to from]
  (if (instance? clojure.lang.IEditableCollection to)
    (persistent! (reduce conj! (transient to) from))
    (reduce conj to from)))
Vars in clojure.core/into:
Used in 0 other vars

Comments top

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