Skip to content

Commit a86a0ba

Browse files
anmonteirodnolen
authored andcommitted
CLJS-1809: Add 0/1 arity to into
1 parent 176c681 commit a86a0ba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4762,6 +4762,8 @@ reduces them without incurring seq initialization"
47624762
(defn into
47634763
"Returns a new coll consisting of to-coll with all of the items of
47644764
from-coll conjoined. A transducer may be supplied."
4765+
([] [])
4766+
([to] to)
47654767
([to from]
47664768
(if-not (nil? to)
47674769
(if (implements? IEditableCollection to)

src/test/cljs/cljs/collections_test.cljs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,3 +611,7 @@
611611
(is (= (get m 1) 2))
612612
(is (= (get m 3) 4))
613613
(is (= m {1 2 3 4}))))
614+
615+
(deftest test-cljs-1809
616+
(is (= (into) []))
617+
(is (= (into [1 2]) [1 2])))

0 commit comments

Comments
 (0)