   (-seq [this] this)
   ISeq
   (-first [_] (aget a i))
-  (-rest [_] (if (lt- (inc i) (.length a))
+  (-rest [_] (if (< (inc i) (.length a))
                (IndexedSeq. a (inc i))
                (list)))
   ICounted

  "Returns a number one greater than num."
  [x] (js* "(~{x} + 1)"))

(defn- lt- [x y]
  (js* "(~{x} < ~{y})"))

(defn- ci-reduce
  "Accepts any collection which satisfies the ICount and IIndexed protocols and
reduces them without incurring seq initialization"

  IIndexed
  (-nth
    ([array n]
       (if (< n (.length array)) (aget array n)))
    ([array n not-found]
       (if (< n (.length array)) (aget array n)
           not-found)))

  ILookup
