Dendrology
summary
Argues that pointer cycles are evil: immutable trees with cycles force full copies and blow up performance; DAGs are treated as optimized trees when there are no cycles. Demonstrates Clojure patterns: prefer extensible maps over terse vectors for trees, annotate nodes with depth and max-depth, implement depth-first numbering (recursive, iterative, and with zippers), and use atoms or zipper context to simplify updates. Shows identity-as-context (id-ref for DB rows, REST ids) and recommends reify context to make traversals debuggable and adaptable.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:19What is a tree
- 4:40Pointer cycles are evil
- 9:28Pointer identities
- 14:18Symbols
- 15:57Tree representation
- 17:10Recursive algorithms
- 18:49Depthfirst recursion
- 23:21Zippers
- 27:21Key Ideas
related talks
05mSometimes it's so obvious in hindsight
01h 02mSolving Problems the Clojure Way
48mAncestry of Polymorphism in Clojure
27mType Your Data!
40mFun with Functional Programming in Clojure
45mPersistent Data Structures for Special Occasions
23mDressed up performance in Clojure
43mSimple ideas with huge impact from Clojure and Rama
