Skip to content

Commit e35be19

Browse files
thomasmulvaneyswannodette
authored andcommitted
CLJS-2750: tag coll in ci-reduce as not-native
Also remove unused 4-arity version of ci-reduce
1 parent 59ae42e commit e35be19

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@
14541454
(defn- ci-reduce
14551455
"Accepts any collection which satisfies the ICount and IIndexed protocols and
14561456
reduces them without incurring seq initialization"
1457-
([cicoll f]
1457+
([^not-native cicoll f]
14581458
(let [cnt (-count cicoll)]
14591459
(if (zero? cnt)
14601460
(f)
@@ -1465,18 +1465,9 @@ reduces them without incurring seq initialization"
14651465
@nval
14661466
(recur nval (inc n))))
14671467
val)))))
1468-
([cicoll f val]
1468+
([^not-native cicoll f val]
14691469
(let [cnt (-count cicoll)]
14701470
(loop [val val, n 0]
1471-
(if (< n cnt)
1472-
(let [nval (f val (-nth cicoll n))]
1473-
(if (reduced? nval)
1474-
@nval
1475-
(recur nval (inc n))))
1476-
val))))
1477-
([cicoll f val idx]
1478-
(let [cnt (-count cicoll)]
1479-
(loop [val val, n idx]
14801471
(if (< n cnt)
14811472
(let [nval (f val (-nth cicoll n))]
14821473
(if (reduced? nval)

0 commit comments

Comments
 (0)