anchor.diff:      pack_map(Map);
   pack(Map) when is_tuple(Map), element(1,Map)=:=dict ->
       pack_map(dict:to_list(Map));
  -pack(_O) ->
  +pack(_Other) ->
       {error, undefined}.
   
   % unpacking.
  
positive.code: % FIXME: write test for unpack_map/1
  -spec unpack_map_(binary(), non_neg_integer(), [{term(), msgpack_term()}])->
      {more, non_neg_integer()} | { any(), binary()}.
  unpack_map_(Bin,  0,  Acc) when is_binary(Bin) -> {{lists:reverse(Acc)}, Bin};
  unpack_map_(Bin, Len, Acc) when is_binary(Bin) and is_integer(Len) ->
      case unpack(Bin) of
  	{ more, MoreLen } -> { more, MoreLen+Len-1 };
  	{ Key, Rest } ->
  
negative.code: % erl> S = <some term>.
  % erl> {S, <<>>} = msgpack:unpack( msgpack:pack(S) ).
  -type reason() ::  enomem | badarg | no_code_matches.
  -type msgpack_term() :: [msgpack_term()]
  		      | {[{msgpack_term(),msgpack_term()}]}
  		      | integer() | float() | binary().
  
  % ===== external APIs ===== %
  -spec pack(Term::msgpack_term()) -> binary().
  pack(I) when is_integer(I) andalso I < 0 ->
      pack_int_(I);
  pack(I) when is_integer(I) ->
      pack_uint_(I);
  pack(F) when is_float(F) ->
      pack_double(F);
  pack(nil) ->
      << 16#C0:8 >>;
  pack(true) ->
      << 16#C3:8 >>;
  pack(false) ->
      << 16#C2:8 >>;
  pack(Bin) when is_binary(Bin) ->
      pack_raw(Bin);
  pack(List)  when is_list(List) ->
  