anchor.diff:                 },
       {Closed, replace(Closed, Streams)}.
   
  +stream_id(false) ->
  +    undefined;
  +stream_id(#idle_stream{id=SID}) ->
  +    SID;
  +stream_id(#active_stream{id=SID}) ->
  +    SID;
  +stream_id(#closed_stream{id=SID}) ->
  +    SID.
  +
  +type(#idle_stream{}) ->
  +    idle_stream;
  +type(#active_stream{}) ->
  +    active_stream;
  +type(#closed_stream{}) ->
  +    closed_stream.
  +
   %% the false clause is here as an artifact of us using a simple
   %% lists:keyfind
   notify_pid(false) -> undefined;
  
positive.code:     replace/2,
      send_what_we_can/4,
      sort/1,
      notify_pid/1,
      update_all_recv_windows/2,
      update_all_send_windows/2,
  
negative.code:               Streams :: streams()) ->
                       streams().
  replace(Stream, Streams) ->
      StreamId = stream_id(Stream),
      WhichSet =
          case {StreamId rem 2, Streams#streams.type} of
              {0, client} ->
  