Skip to content

Instantly share code, notes, and snippets.

@gf3
Created January 19, 2012 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gf3/c3e80e85e2072962c8d6 to your computer and use it in GitHub Desktop.
Save gf3/c3e80e85e2072962c8d6 to your computer and use it in GitHub Desktop.
(with-open
[r (java.io.PushbackReader. (java.io.StringReader. "(prn 9)(prn 11)"))]
(binding [*read-eval* false]
(loop [expr (read r) res []]
(try
(recur (read r)
(conj res expr))
(catch Exception _ res)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment