Commits

Meikel Brandmeyer committed 0036dbe

Bring lazymap up-to-date with lazy branch merge

Comments (0)

Files changed (1)

src/de/kotka/lazymap/LazyMapSeq.clj

   (let [first-val (first (.theSeq this))]
     (new de.kotka.lazymap.LazyMapEntry (key first-val) (val first-val))))
 
-(defn- -rest
+(defn- -more
   [this]
-  (when-let [inner-rest (rest (.theSeq this))]
+  (if-let [inner-rest (next this)]
+    (new de.kotka.lazymap.LazyMapSeq inner-rest)
+    clojure.lang.PersistentList/EMPTY))
+
+(defn- -next
+  [this]
+  (when-let [inner-rest (next (.theSeq this))]
     (new de.kotka.lazymap.LazyMapSeq inner-rest)))
 
 (defn- -cons