Created
November 27, 2010 10:06
-
-
Save trptcolin/717761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn seq1 [#^clojure.lang.ISeq s] | |
(reify clojure.lang.ISeq | |
(first [_] (.first s)) | |
(more [_] (seq1 (.more s))) | |
(next [_] (let [sn (.next s)] (and sn (seq1 sn)))) | |
(seq [_] (let [ss (.seq s)] (and ss (seq1 ss)))) | |
(count [_] (.count s)) | |
(cons [_ o] (.cons s o)) | |
(empty [_] (.empty s)) | |
(equiv [_ o] (.equiv s o)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment