Jan 19, 2013
Brightcove (last updated: February 2017)
Index of all namespaces
« Project + dependencies
Tree-walking with shortcutting.
Walk and modify data structures. API consists of the walk function. Tips: * To prevent descent without modifying a node, the dispatch function may return the identity function. * To handle data structures that arborist doesn't know how to descend into, the dispatch function should return a transformer that calls the walk function manually. Remember to preserve metadata when implementing. * Arborist does not normally descend into metadata, but a transformer could again do this manually. * Seq-walking is lazy. To force seqs, add a dispatch clause such as `(seq? %) (comp doall (partial walk dispatch))