clojure read file line by line

To read a file line by line in Clojure, you can use the with-open macro along with the function. Here's an example:

(with-open [reader ( "path/to/file.txt")]
  (doseq [line (line-seq reader)]
    (println line)))

In this example, replace "path/to/file.txt" with the actual path to your file. The with-open macro ensures that the file is properly closed after reading.

The line-seq function returns a lazy sequence of lines from the file, and doseq is used to iterate over each line and print it.

Please note that you need to have the namespace imported in your code for this to work.

I hope this helps! Let me know if you have any further questions.