anchor.diff:          {stop, {PrevKVs, Reds}, Acc};
       true ->
           AssembledKV = assemble(Bt, K, V),
  -        case Fun(AssembledKV, {PrevKVs, Reds}, Acc) of
  +        case Fun(visit, AssembledKV, {PrevKVs, Reds}, Acc) of
           {ok, Acc2} ->
               stream_kv_node2(Bt, Reds, [AssembledKV | PrevKVs], RestKVs, InRange, Dir, Fun, Acc2);
           {stop, Acc2} ->
  
positive.code: 
  % wraps a 2 arity function with the proper 3 arity function
  convert_fun_arity(Fun) when is_function(Fun, 2) ->
      fun(KV, _Reds, AccIn) -> Fun(KV, AccIn) end;
  convert_fun_arity(Fun) when is_function(Fun, 3) ->
      Fun.    % Already arity 3
  
  make_key_in_end_range_function(#btree{less=Less}, fwd, Options) ->
      case couch_util:get_value(end_key_gt, Options) of
  
negative.code: 
  stream_kp_node(_Bt, _Reds, [], _InRange, _Dir, _Fun, Acc) ->
      {ok, Acc};
  stream_kp_node(Bt, Reds, [{Key, {Pointer, Red}} | Rest], InRange, Dir, Fun, Acc) ->
      case Fun(traverse, Key, Red, Acc) of
      {ok, Acc2} ->
          case stream_node(Bt, Reds, {Pointer, Red}, InRange, Dir, Fun, Acc2) of
          {ok, Acc3} ->
              stream_kp_node(Bt, [Red | Reds], Rest, InRange, Dir, Fun, Acc3);
          {stop, LastReds, Acc3} ->
              {stop, LastReds, Acc3}
          end;
      {skip, Acc2} ->
          stream_kp_node(Bt, [Red | Reds], Rest, InRange, Dir, Fun, Acc2)
      end.
  
  drop_nodes(_Bt, Reds, _StartKey, []) ->
  