How to print the intermediate values in a transient vector?

2020-06-25 Thread Philos Kim
How can I print the *intermediate values* in a transient vector? I tried this but the printed result is not what I want to see. (let [v (transient [])] (dotimes [n 3] (conj! v n) (println v))) ;; printed v #object[clojure.lang.PersistentVector$TransientVector 0x162d8132

How to print the intermediate values in a transient vector?

2020-06-25 Thread Philos Kim
How can I print the intermediate values in a transient vector? I tried this but the printed result is like this and it is not what I want to see. (let [v (transient [])] (dotimes [n 3] (conj! v n) (println v))) ;; printed v #object[clojure.lang.PersistentVector$TransientVector