Learning Clojure (and Functional Programming) I have stumbled upon the problem of converting a mutable n-ary tree represented as nested java.util.ArrayLists into a persistent tree.
Using non-functional programming you would normally create the tree from the root to the leaves. This does not seem to be possible using persistent data structures.
Can someone show me how to construct an immutable tree given a mutable n-ary tree?