anchor.diff:                      remaining_segments :: ['*' | integer()],
                       acc_fun            :: fun(([{binary(),binary()}]) -> any()),
                       segment_acc        :: [{binary(), binary()}],
  -                    final_acc          :: [{integer(), any()}]
  +                    final_acc          :: [{integer(), any()}],
  +                    prefetch=false     :: boolean()
                      }).
   
   -opaque hashtree() :: #state{}.
  
positive.code:                   _ ->
                        CurSeg
                end,
      case {SegId, Seg, Segments} of
          {bad, -1, _} ->
              %% Non-segment encountered, end traversal
              IS;
          {Id, Segment, _} ->
              %% Still reading existing segment
              IS2 = IS#itr_state{current_segment=Segment,
                                 segment_acc=[{K,V} | Acc]},
              iterate(iterator_move(Itr, next), IS2);
          {Id, _, [Seg|Remaining]} ->
              %% Pointing at next segment we are interested in
              IS2 = IS#itr_state{current_segment=Seg,
                                 remaining_segments=Remaining,
                                 segment_acc=[{K,V}],
                                 final_acc=[{Segment, F(Acc)} | FinalAcc]},
              iterate(iterator_move(Itr, next), IS2);
          {Id, _, ['*']} ->
              %% Pointing at next segment we are interested in
              IS2 = IS#itr_state{current_segment=Seg,
                                 remaining_segments=['*'],
                                 segment_acc=[{K,V}],
                                 final_acc=[{Segment, F(Acc)} | FinalAcc]},
              iterate(iterator_move(Itr, next), IS2);
          {Id, _, [NextSeg|Remaining]} ->
              %% Pointing at uninteresting segment, seek to next interesting one
              IS2 = IS#itr_state{current_segment=NextSeg,
                                 remaining_segments=Remaining,
                                 segment_acc=[],
                                 final_acc=[{Segment, F(Acc)} | FinalAcc]},
              Seek = encode(Id, NextSeg, <<>>),
              iterate(iterator_move(Itr, Seek), IS2);
          _ ->
              %% Done with traversal
              IS
      end.
  
negative.code:     {error, invalid_iterator};
  iterator_move(Itr, Seek) ->
      try
  
          eleveldb:iterator_move(Itr, Seek)
      catch
          _:badarg ->
  