Hi,
I suspect some terminal issue here. When providing a file with some lines in it, things work as expected:
user=> (with-open [in (clojure.lang.LineNumberingPushbackReader.
(
clojure.java.io/reader "foo.txt"))]
(binding [*in* in]
(loop [lines (repeatedly read-line)]
(println "You entered:" (first lines))
(when (not= "q" (first lines))
(recur (next lines))))))
You entered: a
You entered: b
You entered: c
You entered: q
nil
Note how 1, 2 and 3 following q are not printed and no hang is encountered.
Kind regards
Meikel