ES6Iterator

typesince v0.0-2371Edit
(ES6Iterator. s)

Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(deftype ES6Iterator [^:mutable s]
  Object
  (next [_]
    (if-not (nil? s)
      (let [x (first s)]
        (set! s (next s))
        #js {:value x :done false})
      #js {:value nil :done true})))