So, it looks like by using slurp, there is still
> lazy-io going on.
>
I don't think slurp is lazy.
user=> (doc slurp)
-
clojure.core/slurp
([f & opts])
Reads the file named by f using the encoding enc into a string
and returns it.
nil
user=>
--
You received thi
Thanks for your answer. I remember the notes on clojure-csv saying it
employed lazy I/O. So, it looks like by using slurp, there is still
lazy-io going on.
On Jun 17, 10:46 am, Miki wrote:
> parse-csv returns a sequence of vectors. The "functional way" of traversing
> a sequence is using map:
>
>
parse-csv returns a sequence of vectors. The "functional way" of traversing
a sequence is using map:
(ns foo
(:gen-class)
(:use clojure-csv.core))
(defn process-file
"Process csv file and prints first item in every row"
[file-name]
(let [data (slurp file-name)
rows (parse-csv
This question is more about knowing what is returned after applying a
function and the best "functional programming" practices to use in
obtaining particular data in what has been returned.
So, given this program:
(ns test-csv
(:gen-class)
(:import (java.io BufferedReader FileReader StringRea