anchor.diff:  
   %% response() is passed into the applicable commands dispatch fun
   -type response() :: {'*' | '+' | 'OK' | 'NO' | 'BAD', imap_term()}.
  +-type address() :: {address, [proplist:property()]}.
   
   %% cmd() specifies a valid command that can be issued via call or cast
   -type cmd() :: {login, auth()}
  
positive.code:     clean_fetch(Params, []).
  
  clean_fetch([], Acc) ->
      {fetch, Acc};
  clean_fetch([<<"UID">>, Uid | Rest], Acc) ->
      clean_fetch(Rest, [{uid, Uid} | Acc]);
  clean_fetch([<<"FLAGS">>, Flags | Rest], Acc) ->
  
negative.code:     %% @todo parse the date
      Envelope = [{date, Date},
                  {subject, Subject},
                  {from, clean_addresses(From)},
                  {sender, clean_addresses(Sender)},
                  {replyto, clean_addresses(ReplyTo)},
                  {to, clean_addresses(To)},
                  {cc, clean_addresses(Cc)},
                  {bcc, clean_addresses(Bcc)},
                  {inreplyto, clean_addresses(InReplyTo)},
                  {messageid, MessageId}],
      clean_fetch(Rest, [{envelope, Envelope} | Acc]);
  clean_fetch([<<"BODY">>, Body | Rest], Acc) ->
      clean_fetch(Rest, [{body, Body} | Acc]).
  
  
  %% @doc clean the provided address
  -spec clean_addresses([[{string, binary()}]]) ->
      [address()].
  clean_addresses(nil) ->
      [];
  clean_addresses(Addresses) ->
      clean_addresses(Addresses, []).
  
  %% @private
  -spec clean_addresses([[{string, binary()}]], [address()]) ->
      [address()].
  clean_addresses([], Acc) ->
      lists:reverse(Acc);
  clean_addresses([[RawName, _, {string, MailBox}, {string, Host}] | Rest], Acc) ->
      Address = [{email, <<MailBox/binary, $@, Host/binary>>}],
      clean_addresses(Rest,
                      [{address, case RawName of
                                     nil -> Address;
                                     {string, Name} -> [{name, Name} | Address]
                                 end} |
                       Acc]).
  
  %%==============================================================================
  %% Response Tokenizing + Parsing
  