Permalink
Browse files

* src/cljs/cljs/core.cljs: declared counted? fix IndexedSeq -reduce

  • Loading branch information...
1 parent 96ca773 commit 1940a49be264f279a78e0f7c40d4842539c15082 David Nolen committed May 1, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/cljs/cljs/core.cljs
View
@@ -393,7 +393,7 @@ reduces them without incurring seq initialization"
(recur (f val (-nth cicoll n)) (inc n))
val))))
-(declare hash-coll cons pr-str)
+(declare hash-coll cons pr-str counted?)
(deftype IndexedSeq [a i]
Object
@@ -430,14 +430,14 @@ reduces them without incurring seq initialization"
(-conj [coll o] (cons o coll))
IReduce
- (-reduce [_ f]
+ (-reduce [coll f]
(if (counted? a)
(ci-reduce a f (aget a i) (inc i))
- (ci-reduce this f (aget a i) (inc i))))
- (-reduce [_ f start]
+ (ci-reduce coll f (aget a i) (inc i))))
+ (-reduce [coll f start]
(if (counted? a)
(ci-reduce a f start i)
- (ci-reduce this f start i)))
+ (ci-reduce coll f start i)))
IHash
(-hash [coll] (hash-coll coll)))

0 comments on commit 1940a49

Please sign in to comment.