anchor.diff:  %% @doc Searches for an attribute in a RADIUS protocol attributes list.
   %%
   find(Attribute, Attributes) ->
  -	orddict:find(Attribute, Attributes).
  +	case lists:keyfind(Attribute, 1, Attributes) of
  +		false ->
  +			{error, not_found};
  +		{Attribute, Value} ->
  +			{ok, Value}
  +	end.
  +
  +-spec get_all(Attribute :: byte(), Attributes :: attributes()) ->
  +	[Value :: term()].
  +%% @doc Returns all values for an `Attribute` which may occur
  +%% 	more than once in	the RADIUS protocol `Attributes' list.
  +%%
  +get_all(Attribute, Attributes) ->
  +	F = fun({Name, Value}) when Name == Attribute ->
  +				{true, Value};
  +			(_) ->
  +				false
  +	end,
  +	lists:filtermap(F, Attributes).
   
   -spec codec(In :: binary() | attributes()) -> attributes() | binary().
   %% @doc Encode or decode a binary RADIUS protocol attributes field.
  
positive.code: -author('vances@motivity.ca').
  
  %% export the radius_attributes public API
  -export([new/0, store/3, fetch/2, find/2]).
  -export([codec/1]).
  -export([hide/3, unhide/3]).
  
  
negative.code: %%  The radius_attributes public API
  %%----------------------------------------------------------------------
  
  -type attributes() :: list({Attribute :: byte(), Value :: term()}).
  
  -spec new() -> Attributes :: attributes().
  %% @doc Create a new RADIUS protocol attributes list.
  %%
  new() ->
  	[].
  
  -spec store(Attribute :: byte(), Value :: term(),
  	Attributes :: attributes()) -> NewAttributes :: attributes().
  %% @doc Add a new attribute to a RADIUS protocol attributes list.
  %% 	If `Attribute' exists it is overwritten with the new `Value'.
  %%
  store(Attribute, Value, Attributes) when is_integer(Attribute),
  		is_list(Attributes) ->
  	lists:keystore(Attribute, 1, Attributes, {Attribute, Value}).
  
  -spec add(Attribute :: byte(), Value :: term(),
  	Attributes :: attributes()) -> NewAttributes :: attributes().
  %% @doc Add an attribute to a RADIUS protocol attributes list.
  %% 	Multiple `Attribute's are allowed.
  %%
  add(Attribute, Value, Attributes) when is_integer(Attribute),
  		is_list(Attributes) ->
  	Attributes ++ [{Attribute, Value}].
  
  -spec fetch(Attribute :: byte(), Attributes :: attributes()) ->
  	Value :: term().
  %% @doc Returns the value for an attribute in a RADIUS protocol
  %% 	attributes list.  Assumes that the attribute is present.
  %%
  fetch(Attribute, Attributes) ->
  	case lists:keyfind(Attribute, 1, Attributes) of
  		false ->
  			exit(not_found);
  		{Attribute, Value} ->
  			Value
  	end.
  
  -spec find(Attribute :: byte(), Attributes :: attributes()) ->
  	Result :: {ok, Value :: term()} | {error, not_found}.
  %% 	Attribute = integer()
  %% 	Attributes = attributes()
  %% 	Result = {ok, Value} | error
  