I am at the REPL, and I create a java array:
=> (def arr (double-array [1 2 3]))
Of course, if I want to look at my arr
, I get:
=> arr
#<double[] [D@2ce628d8>
Is there anything I can do that will make arrays of java primitives print like clojure's persistentVector
s?
=> arr
[1.0 2.0 3.0]
I know I could wrap my arrays in some sort of nice printing function (which is what I currently do), but this is a pain in cases, for example, where the vectors are part of a map:
=> my-map
{"1" #<double[] [D@47254e47>, "2" #<double[] [D@11d2625d>}