anchor.diff:  -spec size_nodes_tree(tree(), state(), {non_neg_integer(), non_neg_integer()}) -> {non_neg_integer(), non_neg_integer()}.
   
   % Leaf node.
  -size_nodes_tree({_, 0, _, []}, _, {NumberTotal, NumberLeaves}) ->
  -    {NumberTotal + 1, NumberLeaves + 1};
  -size_nodes_tree({_, _, _, Subtrees}, State, {NumberTotal, NumberLeaves}) ->
  -    size_nodes_subtrees(Subtrees, State, {NumberTotal + 1, NumberLeaves}).
  +size_nodes_tree({_, 0, _, []}, _, {SizeTotal, SizeLeaves}) ->
  +    {SizeTotal + 1, SizeLeaves + 1};
  +size_nodes_tree({_, _, _, Subtrees}, State, {SizeTotal, SizeLeaves}) ->
  +    size_nodes_subtrees(Subtrees, State, {SizeTotal + 1, SizeLeaves}).
   
   -spec size_nodes_subtrees(subtrees(), state(), {non_neg_integer(), non_neg_integer()}) -> {non_neg_integer(), non_neg_integer()}.
   
  -size_nodes_subtrees([], _, {NumberTotal, NumberLeaves}) ->
  -    {NumberTotal, NumberLeaves};
  -size_nodes_subtrees([Tree | Tail], nil, {NumberTotal, NumberLeaves}) ->
  -    size_nodes_subtrees(Tail, nil, size_nodes_tree(Tree, nil, {NumberTotal, NumberLeaves}));
  -size_nodes_subtrees([{KeyNo, SubtreeNo, KeyValues, SubtreesKey} | Tail], {StateTarget, _, _, LookupFunction} = State, {NumberTotal, NumberLeaves}) ->
  -    size_nodes_subtrees(Tail, State, size_nodes_tree({KeyNo, SubtreeNo, KeyValues, LookupFunction(StateTarget, lookup, SubtreesKey)}, State, {NumberTotal, NumberLeaves})).
  +size_nodes_subtrees([], _, {SizeTotal, SizeLeaves}) ->
  +    {SizeTotal, SizeLeaves};
  +size_nodes_subtrees([Tree | Tail], nil, {SizeTotal, SizeLeaves}) ->
  +    size_nodes_subtrees(Tail, nil, size_nodes_tree(Tree, nil, {SizeTotal, SizeLeaves}));
  +size_nodes_subtrees([{KeyNo, SubtreeNo, KeyValues, SubtreesKey} | Tail], {StateTarget, _, _, LookupFunction} = State, {SizeTotal, SizeLeaves}) ->
  +    size_nodes_subtrees(Tail, State, size_nodes_tree({KeyNo, SubtreeNo, KeyValues, LookupFunction(StateTarget, lookup, SubtreesKey)}, State, {SizeTotal, SizeLeaves})).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  
positive.code: insert(Key, Value, {SubtreeNoMin, KeyNoMax, 0, SortFunction, State, nil}) ->
      {SubtreeNoMin, KeyNoMax, 1, SortFunction, State, {1, 0, [{Key, Value}], []}};
  % Split root node.
  insert(Key, Value, {SubtreeNoMin, KeyNoMax, NumberKeyValues, SortFunction, State, {KeyNo, _, _, _} = Tree}) when KeyNo == KeyNoMax ->
      {SubtreeNoMin, KeyNoMax, NumberKeyValues + 1, SortFunction, State, insert_1({Key, Value}, split_node_root(Tree, SubtreeNoMin, State), SubtreeNoMin, KeyNoMax, SortFunction, State)};
  % Normal.
  insert(Key, Value, {SubtreeNoMin, KeyNoMax, NumberKeyValues, SortFunction, State, Tree}) ->
      {SubtreeNoMin, KeyNoMax, NumberKeyValues + 1, SortFunction, State, insert_1({Key, Value}, Tree, SubtreeNoMin, KeyNoMax, SortFunction, State)}.
  
  -spec insert_1(key_value(), tree(), pos_integer(), pos_integer(), sort_function(), state()) -> tree().
  
  
negative.code: -spec height_1(tree(), state(), non_neg_integer()) -> non_neg_integer().
  
  % Leaf node.
  height_1({_, _, _, []}, _, Height) ->
      Height;
  % The most left subtree.
  height_1({_, _, _, [Tree | _]}, nil, Height) ->
      height_1(Tree, nil, Height + 1);
  height_1({_, _, _, [{KeyNo, SubtreeNo, KeyValues, SubtreesKey} | _]}, {StateTarget, _, _, LookupFunction} = State, Height) ->
      height_1({KeyNo, SubtreeNo, KeyValues, LookupFunction(StateTarget, lookup, SubtreesKey)}, State, Height + 1).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  