feat: add tree-structure-immutable module (persistent ImmutableTreeNode) (#33) (#44)

This commit is contained in:
2026-06-07 22:40:41 +02:00
committed by GitHub
parent 6758a68522
commit f47fb091ec
8 changed files with 415 additions and 0 deletions

View File

@@ -15,6 +15,9 @@ All notable changes to this project are documented here. The format is based on
`TreeConnectors` (`Default` box-drawing or `Ascii`) and supply a per-node renderer that receives
the value, its depth and whether it is its parent's last child. The all-defaults call is
byte-identical to the existing no-arg `prettyString()`.
- New `tree-structure-immutable` module: a persistent `ImmutableTreeNode` with structural sharing
(`addChild`/`removeChild`/`mapValues` return new roots; pre/post/level-order traversals,
`nodeCount`, and `height`).
### Changed
- Rewrote the README for clarity: one consistent example tree, task-oriented sections