anchor.diff:       "\r\n"].
   
   handle_result_fun(WSState) ->
  -    fun(Result, Acc) ->
  +    fun({FrameInfo, Result}, Acc) ->
               case Result of
                   {reply, {Type, Data}} ->
                       do_send(WSState, {Type, Data}),
  
positive.code:                 noreply ->
                      Acc;
                  {close, Reason} ->
                      throw({close, Reason})
              end
      end.
  
  
negative.code:                                             CallbackMod:handle_message(M)
                                      end,
                                      BasicMessages),
                  FoldFun = handle_result_fun(WSState),
                  {catch lists:foldl(FoldFun, ok, lists:zip(FrameInfos, CallbackResults)),
                   NewCallbackState0};
              {advanced,_} ->
                  catch lists:foldl(do_callback_fun(WSState, CallbackMod),
  