Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (require '[clojure.java.io :as io])
- (defn ff []
- (let [p (let [count (atom 0)]
- (proxy [java.io.InputStream] []
- (read []
- (if (< (swap! count inc) 10)
- \a
- -1))))
- sq (line-seq (io/reader p))]
- (doseq [v sq]
- (println v))))
Add Comment
Please, Sign In to add comment