From 2e9afaecf3623ea89002c8cd66d6a61b1e8a2bc5 Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Mon, 25 Aug 2008 20:16:20 +0000 Subject: removed implicit seq for Iterators and Enumerations, added iterator-seq and enumeration-seq explicit constructors --- src/clj/clojure/boot.clj | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/clj') diff --git a/src/clj/clojure/boot.clj b/src/clj/clojure/boot.clj index 35efe753..73380c2f 100644 --- a/src/clj/clojure/boot.clj +++ b/src/clj/clojure/boot.clj @@ -2929,3 +2929,14 @@ (recur (conj s x) etc)) true)) false))) + +(defn iterator-seq + "Returns a seq on a java.util.Iterator. Note that most collections + providing iterators implement Iterable and thus support seq directly." + [iter] + (clojure.lang.IteratorSeq/create iter)) + +(defn enumeration-seq + "Returns a seq on a java.lang.Enumeration" + [e] + (clojure.lang.EnumerationSeq/create e)) -- cgit v1.2.3-70-g09d2