*in* is a Reader, not a map
(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.
This commit is contained in:
parent
8ce00d29fd
commit
d1c2811d13
4 changed files with 551 additions and 543 deletions
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue