Clojure : Read an edn file line by line
<p>I have written data like that in a file (kind of)</p>

<pre><code>{:a 25 :b 28}
{:a 2 :b 50}
...
</code></pre>

<p>I want to have a lazy sequence of these maps.</p>

<p>There are around 40 millions of lines. I can also write chunks of 10000 but I do not thnik it will change the way the functions are written (<code>mapcat</code> instead of <code>map</code>)</p>

<p>To read it, I wrote</p>

<pre><code>(with-open [affectations (io/reader "dev-resources/affectations.edn")]
  (map read-string affectations))
</code></pre>

<p>The problem is that Clojure tells</p>

<pre><code>Don't know how to create ISeq from : java.io.BufferedReader
</code></pre>

<p>To be honest I understand nothing on the java.io namespace.
I would like to have a lazy sequence of the data in the file but I do not know how to turn the stream into strings and then collections.</p>

<p>Any idea ?</p>

<p>Is this <code>read-line</code> ?</p>

<p>Thanks</p>