Skip to content

Commit

Permalink
CLJS-391: add some missing IEmptyableCollection impls
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Jack authored and David Nolen committed Oct 9, 2012
1 parent 9ff4de2 commit b0a397f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/cljs/cljs/core.cljs
Expand Up @@ -597,6 +597,9 @@ reduces them without incurring seq initialization"
ICollection
(-conj [coll o] (cons o coll))

IEmptyableCollection
(-empty [coll] cljs.core.List/EMPTY)

IReduce
(-reduce [coll f]
(if (counted? a)
Expand Down Expand Up @@ -659,6 +662,8 @@ reduces them without incurring seq initialization"
([array f start]
(ci-reduce array f start))))

(declare with-meta)

(deftype RSeq [ci i meta]
Object
(toString [this]
Expand Down Expand Up @@ -692,6 +697,9 @@ reduces them without incurring seq initialization"
(-conj [coll o]
(cons o coll))

IEmptyableCollection
(-empty [coll] (with-meta cljs.core.List/EMPTY meta))

IHash
(-hash [coll] (hash-coll coll)))

Expand Down Expand Up @@ -1911,6 +1919,9 @@ reduces them without incurring seq initialization"
(-conj [this o]
(cons o this))

IEmptyableCollection
(-empty [coll] (with-meta cljs.core.List/EMPTY meta))

IHash
(-hash [coll] (caching-hash coll hash-coll __hash)))

Expand Down Expand Up @@ -4861,6 +4872,9 @@ reduces them without incurring seq initialization"
ICollection
(-conj [coll o] (cons o coll))

IEmptyableCollection
(-empty [coll] (with-meta cljs.core.List/EMPTY meta))

IHash
(-hash [coll] (caching-hash coll hash-coll __hash))

Expand Down

0 comments on commit b0a397f

Please sign in to comment.