anchor.diff:  %% TODO: read repair...or another blog post?
   
   waiting({ok, ReqID, IdxNode, Obj},
  -        SD0=#state{from=From, num_r=NumR0, replies=Replies0,
  +        SD0=#state{from=From, num_r=NumR0,
                      r=R, n=N, timeout=Timeout}) ->
       NumR = NumR0 + 1,
  -    Replies = [{IdxNode, Obj} | Replies0],
  -    SD = SD0#state{num_r=NumR, replies=Replies},
  +    SD = save_reply(IdxNode, Obj, SD0#state{num_r = NumR}),
  +    Replies = SD#state.replies,
       case NumR of
           Min when Min >= R ->
               case merge(SD0, Replies) of
  
positive.code:     end.
  
  wait_for_n({ok, _ReqID, IdxNode, Obj},
             SD0=#state{n=N, num_r=NumR, replies=Replies0}) when NumR == N - 1 ->
      Replies = [{IdxNode, Obj}|Replies0],
      {next_state, finalize, SD0#state{num_r=N, replies=Replies}, 0};
  
  wait_for_n({ok, _ReqID, IdxNode, Obj},
             SD0=#state{num_r=NumR0, replies=Replies0, timeout=Timeout}) ->
      NumR = NumR0 + 1,
      Replies = [{IdxNode, Obj}|Replies0],
      {next_state, wait_for_n, SD0#state{num_r=NumR, replies=Replies}, Timeout};
  
  %% TODO partial repair?
  wait_for_n(timeout, SD) ->
  
negative.code:                         [R, Ress]),
              not_found;
          false ->
              Res = lists:foldl(fun mmath_bin:merge/2, DH, DT),
              {R, Res}
      end.
  
  %% Snappy :(
  -dialyzer({nowarn_function, decompress/1}).
  