Skip to content

Commit 260556d

Browse files
slipsetmfikes
authored andcommitted
CLJS-2912 Reuse seq in some
1 parent a151497 commit 260556d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,8 +4206,8 @@ reduces them without incurring seq initialization"
42064206
this will return :fred if :fred is in the sequence, otherwise nil:
42074207
(some #{:fred} coll)"
42084208
[pred coll]
4209-
(when (seq coll)
4210-
(or (pred (first coll)) (recur pred (next coll)))))
4209+
(when-let [s (seq coll)]
4210+
(or (pred (first s)) (recur pred (next s)))))
42114211

42124212
(defn not-any?
42134213
"Returns false if (pred x) is logical true for any x in coll,

0 commit comments

Comments
 (0)