type | since v1.10.844 | Edit |
(IntegerRangeChunk. start step count)
(deftype IntegerRangeChunk [start step count]
ICounted
(-count [coll] count)
ISeq
(-first [coll] start)
IIndexed
(-nth [coll i]
(+ start (* i step)))
(-nth [coll i not-found]
(if (and (>= i 0) (< i count))
(+ start (* i step))
not-found))
IChunk
(-drop-first [coll]
(if (<= count 1)
(throw (js/Error. "-drop-first of empty chunk"))
(IntegerRangeChunk. (+ start step) step (dec count)))))