Expand description
Persistent sorted map: a weight-recorded red-black tree ported from
java/src/main/java/hara/lang/data/SortedMap.java.
Leaf modelling: Java uses two non-null leaf sentinels (EMPTY_NODE,
colour BLACK, and DOUBLE_EMPTY_NODE, colour DOUBLE_BLACK; both size 0)
so the delete rebalancer can push a “double black” up from a removed
leaf. Rust has no null links, so the child link itself is the three-state
enum [Link]: Empty/DoubleEmpty are the two size-0 leaves and
Full(Rc<Node>) is an internal node. Every colour test in
balance/rotate is then a direct transcription of the Java code.