Skip to content
Browse files

CLJS-391: add some missing IEmptyableCollection impls

  • Loading branch information...
1 parent 9ff4de2 commit b0a397f65c7e4faf1c6816d2b188c7b367029294 Tom Jack committed with David Nolen Oct 8, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/cljs/cljs/core.cljs
View
14 src/cljs/cljs/core.cljs
@@ -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)
@@ -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]
@@ -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)))
@@ -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)))
@@ -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))

0 comments on commit b0a397f

Please sign in to comment.
Something went wrong with that request. Please try again.