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 a08587f commit 723e1fcCopy full SHA for 723e1fc
src/main/cljs/cljs/core.cljs
@@ -3495,8 +3495,8 @@ reduces them without incurring seq initialization"
3495
"Naive impl of to-array as a start."
3496
[s]
3497
(let [ary (array)]
3498
- (loop [s s]
3499
- (if (seq s)
+ (loop [s (seq s)]
+ (if-not (nil? s)
3500
(do (. ary push (first s))
3501
(recur (next s)))
3502
ary))))
@@ -3507,7 +3507,7 @@ reduces them without incurring seq initialization"
3507
[coll]
3508
(let [ret (make-array (count coll))]
3509
(loop [i 0 xs (seq coll)]
3510
- (when xs
+ (when-not (nil? xs)
3511
(aset ret i (to-array (first xs)))
3512
(recur (inc i) (next xs))))
3513
ret))
0 commit comments