Skip to content

Commit e6a6073

Browse files
committed
Vector IDrop impl, elide another chunked-seq test in LITE_MODE
1 parent fcfe7f9 commit e6a6073

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12436,6 +12436,13 @@ reduces them without incurring seq initialization"
1243612436
(recur (inc i) init)))
1243712437
init))))
1243812438

12439+
IDrop
12440+
(-drop [v n]
12441+
(let [cnt (alength array)]
12442+
(if (< n cnt)
12443+
(prim-seq array n)
12444+
nil)))
12445+
1243912446
IComparable
1244012447
(-compare [x y]
1244112448
(if (vector? y)

src/test/cljs/cljs/collections_test.cljs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@
193193
(is (not (counted? (range))))
194194
(is (counted? (range 0 10 1)))
195195
(is (not (counted? (range 0.1 10 1))))
196-
(is (chunked-seq? (range 0 10 1)))
197-
(is (chunked-seq? (range 0.1 10 1)))
196+
;; no chunked seqs in :lite-mode
197+
(when-not ^boolean LITE_MODE
198+
(is (chunked-seq? (range 0 10 1)))
199+
(is (chunked-seq? (range 0.1 10 1))))
198200
(is (= (range 0.5 8 1.2) '(0.5 1.7 2.9 4.1 5.3 6.5 7.7)))
199201
(is (= (range 0.5 -4 -2) '(0.5 -1.5 -3.5)))
200202
(testing "IDrop"

0 commit comments

Comments
 (0)