We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be76830 commit fa7c692Copy full SHA for fa7c692
src/main/cljs/cljs/core.cljs
@@ -4656,6 +4656,8 @@ reduces them without incurring seq initialization"
4656
4657
(defn interleave
4658
"Returns a lazy seq of the first item in each coll, then the second etc."
4659
+ ([] ())
4660
+ ([c1] (lazy-seq c1))
4661
([c1 c2]
4662
(lazy-seq
4663
(let [s1 (seq c1) s2 (seq c2)]
src/test/cljs/cljs/collections_test.cljs
@@ -615,3 +615,7 @@
615
(deftest test-cljs-1809
616
(is (= (into) []))
617
(is (= (into [1 2]) [1 2])))
618
+
619
+(deftest test-cljs-1951
620
+ (is (= () (interleave)))
621
+ (is (= '(1 2 3) (interleave [1 2 3]))))
0 commit comments