anchor.diff:  
   
   run_find(Resp, Db, Sel, Opts) ->
  -    mango_crud:find(Db, Sel, fun handle_doc/2, {Resp, "\r\n", []}, Opts).
  -
  -
  -handle_doc({add_key, Key, Value}, {Resp, Prepend, KVs}) ->
  +    Acc0 = #vacc{
  +        resp = Resp,
  +        prepend = "\r\n",
  +        kvs = []
  +    },
  +    mango_crud:find(Db, Sel, fun handle_doc/2, Acc0, Opts).
  +
  +
  +handle_doc({add_key, Key, Value}, Acc0) ->
  +    #vacc{resp=Resp, prepend=Prepend, kvs=KVs} = Acc0,
       NewKVs = lists:keystore(Key, 1, KVs, {Key, Value}),
       {ok, {Resp, Prepend, NewKVs}};
  -handle_doc({row, Doc}, {Resp0, Prepend, KVs}) ->
  +handle_doc({row, Doc}, Acc0) ->
  +    #vacc{resp=Resp0, prepend=Prepend, kvs=KVs} = Acc0,
       Chunk = [Prepend, ?JSON_ENCODE(Doc)],
       {ok, Resp1} = chttpd:send_delayed_chunk(Resp0, Chunk),
       {ok, {Resp1, ",\r\n", KVs}}.
  
positive.code: -include("mango.hrl").
  -include("mango_idx.hrl").
  
  
  handle_req(#httpd{} = Req, Db0) ->
      try
  
negative.code:     {ok, Opts0} = mango_opts:validate_find(chttpd:json_body_obj(Req)),
      {value, {selector, Sel}, Opts} = lists:keytake(selector, 1, Opts0),
      {ok, Resp0} = start_find_resp(Req),
      {ok, AccOut} = run_find(Resp0, Db, Sel, Opts),
      end_find_resp(AccOut);
  
  handle_find_req(Req, _Db) ->
      chttpd:send_method_not_allowed(Req, "POST").
  