(map? *in*) was true because *in* was a plain map of read-line-fn/read-fn closures; the JVM *in* is a java.io.Reader so map? is false. A defrecord doesn't help (records are maps). Make the reader a reify over a new IReader protocol — a non-map value — and route read/read-line/read+string/line-seq through its -read-line/-read-form/-read+string methods instead of keyword access. with-in-str's __string-reader and the stdin *in* both reify it. Closes *in*-bound + *in*-is-bound. |
||
|---|---|---|
| .. | ||
| clojure/core | ||
| jolt | ||