feat: add runnable :samples module (#47)
Some checks failed
Test / JVM / JS / Wasm / Native + API check (push) Has been cancelled
Test / iOS (push) Has been cancelled

* build: scaffold :samples module (issue #37)

* feat: add runnable, verified examples to :samples (issue #37)

* ci,docs: run :samples in CI and document ./gradlew :samples:run (issue #37)
This commit is contained in:
2026-06-08 13:59:16 +02:00
committed by GitHub
parent 2671c46f96
commit 1fce412815
7 changed files with 218 additions and 1 deletions

View File

@@ -213,6 +213,15 @@ val bigger = root.addChild(ImmutableTreeNode("Asia")) // root is unchanged; bigg
bigger.preOrder().forEach { println(it.value) } // pre/post/level-order, nodeCount(), height()
```
## Examples
A runnable `:samples` module bundles compile-checked, assertion-verified examples of the core API
and the serialization, coroutines, and immutable modules. Run them with:
```
./gradlew :samples:run
```
## Notes
`TreeNode` is mutable and not thread-safe. Add your own synchronization if you share a tree across