Forest: One Tree to Rule Them All
summary
Library parses and mutates ASTs and arbitrary tree data using immutable maps and compact hex HIDs as stable pointers; children are stored in kHID vectors and formats include hiccup, enlive, a dense “bush” and a tree form. Search returns vectors of HID paths and supports a recursive star-star wildcard to skip zero or more levels. Mutations run inside a with-forest transaction that yields a new immutable forest (HIDs unchanged); demo adds hiccup, finds three A→B paths, and updates a value from 1 to 2 with the change reflected across the subtree.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 0:38hexadecimal ID
- 1:58formats
- 2:27search
- 5:38hiccup data
- 6:33finding paths
- 7:08tree modification
- 8:18summary
related talks
55mDeforestation and Program Fusion
36mMythical trees and where to find them
24mChoice Trees: Representing Nondeterministic, Recursive, and Impure Programs in C...
35mWhat Lies Beneath - A Deep Dive Into Clojure's Data Structures
39mThe Linux Maple Tree
21mBonsai: Compiling Queries to Pruned Tree Traversals
15mSealing Pointer-Based Optimizations Behind Pure Functions
32mTyped Program Analysis Without Encodings
