-
-
Save xonev/df517e2dc6716cf0f339 to your computer and use it in GitHub Desktop.
Attempt to return a lazy sequence from a read of a file
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
(ns storm-spike.bolt | |
(:use [backtype.storm clojure config]) | |
(:import (java.io BufferedReader FileReader)) | |
(:gen-class)) | |
(defn process-file [file-name line-func] | |
(with-open [rdr (clojure.java.io/reader file-name)] | |
(map line-func (line-seq rdr)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment