Skip to content

Commit 32a18dc

Browse files
authored
Replace every? some? with every? identity in a few basilisp.core fns (#1245)
`identity` should be faster than `some?`
1 parent 566d307 commit 32a18dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/basilisp/core.lpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@
27642764
(lazy-seq
27652765
(when-let [coll (seq coll)]
27662766
(let [colls (map seq colls)]
2767-
(when (every? some? colls)
2767+
(when (every? identity colls)
27682768
(cons (apply f (first coll) (map first colls))
27692769
(apply map f (rest coll) (map rest colls)))))))))
27702770

@@ -3055,7 +3055,7 @@
30553055
(lazy-seq
30563056
(when-let [coll (seq coll)]
30573057
(let [colls (map seq colls)]
3058-
(when (every? some? colls)
3058+
(when (every? identity colls)
30593059
(concat (apply coll-firsts coll colls)
30603060
(apply interleave (rest coll) (map rest colls))))))))))
30613061

0 commit comments

Comments
 (0)