anchor.diff:  
   %%-------------------------------------------------------------------------
   %% @doc
  -%% ===Create a new trie instance.===
  -%% @end
  -%%-------------------------------------------------------------------------
  -
  -new() ->
  -    [].
  -
  -new([H | T]) ->
  -    {RootNode, _} = new_instance(H, T),
  -    RootNode.
  -
  -new_instance({[_ | _] = S, V}, L) ->
  -    new_instance_modify(L, new_instance_state(S, V, error));
  -           
  -new_instance([_ | _] = S, L) ->
  -    new_instance_modify(L, new_instance_state(S, empty, error)).
  -
  -new_instance_state([], V1, _) ->
  -    {[], V1};
  -
  -new_instance_state([H | T], V1, V0)
  -    when is_integer(H) ->
  -    {{H, H, {{T, V1}}}, V0}.
  -
  -new_instance_modify([], State) ->
  -    State;
  -
  -new_instance_modify([{[_ | _] = S, V} | T], State) ->
  -    new_instance_modify(T, modify_state(S, V, State));
  -
  -new_instance_modify([[_ | _] = S | T], State) ->
  -    new_instance_modify(T, modify_state(S, empty, State)).
  +%% ===Append a value as a list element in a trie instance.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +append([_ | _] = Key, Value, Node) ->
  +    update(Key, fun(OldValue) -> OldValue ++ [Value] end, [Value], Node).
  +
  +%%-------------------------------------------------------------------------
  +%% @doc
  +%% ===Append a list of values as a list element in a trie instance.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +append_list([_ | _] = Key, ValueList, Node) ->
  +    update(Key, fun(OldValue) -> OldValue ++ ValueList end, ValueList, Node).
  +
  +%%-------------------------------------------------------------------------
  +%% @doc
  +%% ===Erase a value in a trie.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +erase([_ | _] = Key, Node) ->
  +    erase_node(Key, Node).
  +
  +erase_node([_ | _], [] = OldNode) ->
  +    OldNode;
  +
  +erase_node([H | _], {I0, I1, _} = OldNode)
  +    when is_integer(H), H < I0;
  +         is_integer(H), H > I1 ->
  +    OldNode;
  +
  +erase_node([H | T], {I0, I1, Data} = OldNode)
  +    when is_integer(H) ->
  +    I = H - I0 + 1,
  +    {Node, Value} = erlang:element(I, Data),
  +    if
  +        T == Node ->
  +            if
  +                Value == error ->
  +                    OldNode;
  +                true ->
  +                    {I0, I1, erlang:setelement(I, Data, {[], error})}
  +            end;
  +        T == [] ->
  +            if
  +                Value == error ->
  +                    OldNode;
  +                true ->
  +                    {I0, I1, erlang:setelement(I, Data, {Node, error})}
  +            end;
  +        is_list(Node) ->
  +            OldNode;
  +        is_tuple(Node) ->
  +            {I0, I1, erlang:setelement(I, Data, {erase_node(T, Node), Value})}
  +    end.
  +
  +%%-------------------------------------------------------------------------
  +%% @doc
  +%% ===Fetch a value from a trie.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +fetch([H], {I0, I1, Data})
  +    when is_integer(H), H >= I0, H =< I1 ->
  +    {Node, Value} = erlang:element(H - I0 + 1, Data),
  +    if
  +        is_tuple(Node); Node == [] ->
  +            if
  +                Value /= error ->
  +                    Value
  +            end
  +    end;
  +
  +fetch([H | T], {I0, I1, Data})
  +    when is_integer(H), H >= I0, H =< I1 ->
  +    {Node, Value} = erlang:element(H - I0 + 1, Data),
  +    case Node of
  +        {_, _, _} ->
  +            fetch(T, Node);
  +        T when Value /= error ->
  +            Value
  +    end.
  +
  +%%-------------------------------------------------------------------------
  +%% @doc
  +%% ===Fetch all the keys in a trie.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +fetch_keys(Node) ->
  +    foldr(fun(Key, _, L) -> [Key | L] end, [], Node).
  +
  +%%-------------------------------------------------------------------------
  +%% @doc
  +%% ===Filter a trie with a predicate function.===
  +%% @end
  +%%-------------------------------------------------------------------------
  +
  +filter(F, Node) when is_function(F, 2) ->
  +    filter_node(F, [], Node).
  +
  +filter_node(F, Key, {I0, I1, Data}) ->
  +    {I0, I1, filter_element(F, I1 - I0 + 1, I0 - 1, Key, Data)};
  +
  +filter_node(_, _, [_ | _] = L) ->
  +    L.
  +
  +filter_element(_, 0, _, _, Data) ->
  +    Data;
  +
  +filter_element(F, I, Offset, Key, Data) ->
  +    {Node, Value} = erlang:element(I, Data),
  +    if
  +        Node == [] ->
  +            if
  +                Value == error ->
  +                    filter_element(F, I - 1, Offset, Key, Data);
  +                true ->
  +                    case F(Key ++ [Offset + I], Value) of
  +                        true ->
  +                            filter_element(F, I - 1, Offset, Key, Data);
  +                        false ->
  +                            filter_element(F, I - 1, Offset, Key,
  +                                erlang:setelement(I, Data, {[], error}))
  +                    end
  +            end;
  +        Value == error ->
  +            filter_element(F, I - 1, Offset, Key, erlang:setelement(I, Data,
  +                {filter_node(F, Key ++ [Offset + I], Node), Value}));
  +        true ->
  +            NewKey = Key ++ [Offset + I],
  +            if
  +                is_list(Node) == true ->
  +                    case F(NewKey ++ Node, Value) of
  +                        true ->
  +                            filter_element(F, I - 1, Offset, Key, Data);
  +                        false ->
  +                            filter_element(F, I - 1, Offset, Key,
  +                                erlang:setelement(I, Data, {[], error}))
  +                    end;
  +                true ->
  +                    case F(NewKey, Value) of
  +                        true ->
  +                            filter_element(F, I - 1, Offset, Key, Data);
  +                        false ->
  +                            filter_element(F, I - 1, Offset, Key,
  +                                erlang:setelement(I, Data, 
  +                                    {filter_node(F, NewKey, Node), error}))
  +                    end
  +            end
  +    end.
   
   %%-------------------------------------------------------------------------
   %% @doc
  
positive.code: 
  %%-------------------------------------------------------------------------
  %% @doc
  %% ===Store a value in a trie instance.===
  %% @end
  %%-------------------------------------------------------------------------
  
  store([_ | _] = S, RootNode) ->
      store(S, empty, RootNode).
  
  store([_ | _] = S, V, RootNode) ->
      {NewRootNode, _} = modify_state(S, V, {RootNode, error}),
      NewRootNode.
  
  %%-------------------------------------------------------------------------
  %% @doc
  
negative.code: %%%
  %%% BSD LICENSE
  %%% 
  %%% Copyright (c) 2010-2011, Michael Truog <mjtruog at gmail dot com>
  %%% All rights reserved.
  %%% 
  %%% Redistribution and use in source and binary forms, with or without
  