Nested data structures contain other collections or values at multiple levels. Modeling them as trees makes parent-child relationships visible and gives a practical way to reason about traversing and transforming complex data. section 8.4 section 8.4.2
A tree interpretation depends on the conventions chosen for the data. One example treats a vector under `:n` as child nodes:
- A vector marks a branching node; its items are children. section 8.4
- A non-vector value under `:n` marks a terminal, or leaf, node; other map values are data belonging to that node. section 8.4
Figure 8.10. A possible tree rendition of a nested data structure.
See one possible tree rendition of the nested data structure. section 8.4
Traversal visits each node once. Depth-first traversal visits a node’s children before other nodes at the same level; breadth-first traversal visits nodes at the same level before moving deeper. Pre-order applies a function before descending, while post-order applies it after reaching the innermost items. section 8.4
Transforming nested collections
`clojure.walk/prewalk` and `postwalk` apply a one-argument function to nested items. For example, prewalk can inspect a pipeline node before descending, allowing processing of a branch to be skipped. The result generally retains the input collection type, depending on the transformation. section 8.4.2






