Can I make a transition / save the entire data structure?

From what I can say on the Clojure docs page for the transient , calling transientand persistent!only for the data structure acts on this collection object (vector, hash map or hash set).

If I have a tree of objects, is there a way to recursively take a temporary copy of the entire structure? And then bring the whole structure back?

+4
source share
1 answer

Seems likely, as @Alex said you would need to flip your own function that would track the data structure. Also note that there is no assoc-in!parallel assoc-in, which assumes that you can also run your own version if you want assoc-ina nested data structure.

0
source

All Articles