RangedIterator

typesince v0.0-2371Edit
(RangedIterator. i base arr v start end)

Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(deftype RangedIterator [^:mutable i ^:mutable base ^:mutable arr v start end]
  Object
  (hasNext [this]
    (< i end))
  (next [this]
    (when (== (- i base) 32)
      (set! arr (unchecked-array-for v i))
      (set! base (+ base 32)))
    (let [ret (aget arr (bit-and i 0x01f))]
      (set! i (inc i))
      ret)))