Is the print-method
implementation for functions intended to produce valid edn
syntax? In some cases, it does not:
user> (require '[org.httpkit.server :as http])
user> (def s (http/run-server (fn [req] {:status 200}) {}))
user> (prn s)
#function[clojure.lang.AFunction/1]
Symbol names can't start with a number, so clojure.lang.AFunction/1
causes a parse error when read back:
user> (clojure.edn/read-string (prn-str s))
Execution error at user/eval7394 (REPL:68).
Invalid token: clojure.lang.AFunction/1
Is this the expected behavior? If so, printing and re-reading data structures that may contain fns can fail.