anchor.diff:  /// Function to extract the parts of type [P] from a key of type [K].
   typedef GetParts<K, P> = Iterable<P> Function(K key);
   
  -/// A generalized [Trie] (or prefix tree) in which the keys [K] of values [V]
  -/// are split into smaller parts of type [P].
  +/// A generalized [Trie] (or prefix tree) which keys of type [K] split into
  +/// parts of type [P], and values of type [V].
   class Trie<K, P extends Comparable<P>, V> extends MapBase<K, V> {
  -  /// Creates an empty [Trie] that splits the keys of type [K] with into [parts]
  -  /// with the provided function. Optionally a custom [root] node can be
  -  /// provided.
  +  /// Creates an empty [Trie] that splits the keys of type [K] into [parts] of
  +  /// type [P] with the provided function. Optionally a custom [root] node can
  +  /// be provided.
     factory Trie({required GetParts<K, P> parts, TrieNode<K, P, V>? root}) =>
         Trie._(root ?? TrieNodeImpl<K, P, V>(), parts);
   
  -  /// Creates trie from another instance. Optionally redefines how the [parts]
  -  /// of the keys are computed and optionally provides a custom [root] node.
  +  /// Creates a [Trie] from another instance. Optionally redefines how the
  +  /// [parts] of the keys are computed and provides a custom [root] node.
     factory Trie.fromTrie(Trie<K, P, V> other,
             {GetParts<K, P>? parts, TrieNode<K, P, V>? root}) =>
         Trie<K, P, V>.fromMap(other, parts: parts ?? other._getParts, root: root);
   
  -  /// Creates trie from a [Map]. Optionally provides a custom root
  -  /// node [root], and/or redefines how the [parts] of the keys are computed.
  +  /// Creates a [Trie] from a [Map]. The [parts] define how the keys are
  +  /// computed and optionally provides a custom [root] node.
     factory Trie.fromMap(Map<K, V> other,
         {required GetParts<K, P> parts, TrieNode<K, P, V>? root}) {
       final result = Trie<K, P, V>(parts: parts, root: root);
  
positive.code:   /// Root node of the tree.
    final TrieNode<K, P, V> _root;
  
    /// Number of values in the tree.
    int _length = 0;
  
    /// Internal constructor for the [Trie].
    Trie._(this._root, this._getParts)
        : assert(!_root.hasKeyAndValue,
              'The initial root should not have a key or value.'),
          assert(!_root.hasNodes,
              'The initial root node should not have child nodes.');
  
    @override
    int get length => _length;
  
negative.code:       final nodes = <TrieNode<K, P, V>>[_root];
        // Navigate to the right node.
        for (final part in _getParts(key)) {
          final node = nodes.last.getChild(part);
          if (node == null) {
            return null;
          }
          parts.add(part);
          nodes.add(node);
        }
        // Verify we found a value node.
        var current = nodes.removeLast();
        if (current.hasKeyAndValue) {
          // Remove the value from the tree.
  