RSeq
(RSeq. ci i meta)
(deftype RSeq [ci i meta]
Object
(toString [coll]
(pr-str* coll))
(equiv [this other]
(-equiv this other))
(indexOf [coll x]
(-indexOf coll x 0))
(indexOf [coll x start]
(-indexOf coll x start))
(lastIndexOf [coll x]
(-lastIndexOf coll x (count coll)))
(lastIndexOf [coll x start]
(-lastIndexOf coll x start))
ICloneable
(-clone [_] (RSeq. ci i meta))
IMeta
(-meta [coll] meta)
IWithMeta
(-with-meta [coll new-meta]
(if (identical? new-meta meta)
coll
(RSeq. ci i new-meta)))
ISeqable
(-seq [coll] coll)
ISequential
IEquiv
(-equiv [coll other] (equiv-sequential coll other))
ISeq
(-first [coll]
(-nth ci i))
(-rest [coll]
(if (pos? i)
(RSeq. ci (dec i) nil)
()))
INext
(-next [coll]
(when (pos? i)
(RSeq. ci (dec i) nil)))
ICounted
(-count [coll] (inc i))
ICollection
(-conj [coll o]
(cons o coll))
IEmptyableCollection
(-empty [coll] (.-EMPTY List))
IHash
(-hash [coll] (hash-ordered-coll coll))
IReduce
(-reduce [col f] (seq-reduce f col))
(-reduce [col f start] (seq-reduce f start col)))