Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

Meet Operations

  • meet_into performs a meet on the subtrie at the current focus with a subtrie from another zipper
  • meet_2 experimental operation that meets the current subtrie with two other subtries simultaneously

Subtract Operations

  • subtract_into performs subtract on the subtrie at the current focus, subtracting a subtrie from another zipper

Restrict Operations

  • restrict performs restrict on the subtrie at the current focus using a subtrie from another zipper
  • restricting populates "stem" paths in the current subtrie with corresponding subtries from the source