评论由:pbwolf发起
原始问题从{{toString}}开始。一个更生动的问题是,这个问题证明了{{pr}}在生成EDN时的不可靠性。
presence 或 absence of the intervening {{print-str}}(调用者可能与{{pr}}无关)会产生重大差异
`
user> (clojure.edn/read-string
(first
(clojure.edn/read-string
(let [mk-str (fn [] (lazy-seq [(str ["ZiZi"])]))
a (mk-str)]
;(print-str a)
(pr-str a)))))
["ZiZi"]
user> (clojure.edn/read-string
(first
(clojure.edn/read-string
(let [mk-str (fn [] (lazy-seq [(str ["ZiZi"])]))
a (mk-str)]
(print-str a)
(pr-str a)))))
[ZiZi]
`