Algebra on Subtries
The ZipperWriting trait includes algebraic operations that operate on subtries below a zipper's focus.
These methods provide the same fundamental operations as the whole-map operations described in Algebraic Operations on Whole Maps, but applied to specific subtries within a larger trie structure. This enables surgical modification of specific portions of large data structures, while leaving the rest of the structure intact.
Join Operations
join_intoperforms a join on the subtrie at the current focus with a subtrie from another zipperjoin_mapjoins aPathMapinto the current subtrie, consuming the mapjoin_into_takejoins and consumes the source subtrie from another write zipperjoin_k_path_intoperforms join_k_path operation on the current subtrie
Meet Operations
meet_intoperforms a meet on the subtrie at the current focus with a subtrie from another zippermeet_2experimental operation that meets the current subtrie with two other subtries simultaneously
Subtract Operations
subtract_intoperforms subtract on the subtrie at the current focus, subtracting a subtrie from another zipper
Restrict Operations
restrictperforms restrict on the subtrie at the current focus using a subtrie from another zipperrestrictingpopulates "stem" paths in the current subtrie with corresponding subtries from the source