Skip to content

Commit 26e1d8a

Browse files
committed
core.clj: added iterator-seq and enumeration-seq, both mapping to clojure.lang.EnumeratorSeq
1 parent 4cf2f12 commit 26e1d8a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Clojure/Clojure/Bootstrap/core.clj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,17 +3421,17 @@
34213421
; (when (. rs (next))
34223422
; (cons (apply struct row-struct (row-values)) (thisfn)))))]
34233423
; (rows)))
3424-
;;; later (boring)
3425-
;(defn iterator-seq
3426-
; "Returns a seq on a java.util.Iterator. Note that most collections
3427-
; providing iterators implement Iterable and thus support seq directly."
3428-
; [iter]
3429-
; (clojure.lang.IteratorSeq/create iter))
3430-
;
3431-
;(defn enumeration-seq
3432-
; "Returns a seq on a java.util.Enumeration"
3433-
; [e]
3434-
; (clojure.lang.EnumerationSeq/create e))
3424+
3425+
(defn iterator-seq
3426+
"Returns a seq on a java.util.Iterator. Note that most collections
3427+
providing iterators implement Iterable and thus support seq directly."
3428+
[iter]
3429+
(clojure.lang.EnumeratorSeq/create iter)) ;;; IteratorSeq
3430+
3431+
(defn enumeration-seq
3432+
"Returns a seq on a java.util.Enumeration"
3433+
[e]
3434+
(clojure.lang.EnumeratorSeq/create e)) ;;; EnumerationSeq
34353435
;;; Should we make compatible with Java?
34363436
(defn format
34373437
"Formats a string using java.lang.String.format, see java.util.Formatter for format

0 commit comments

Comments
 (0)