anchor.diff:      Sum = lists:foldl(fun(X, Acc) -> ?TYPE:merge(X, Acc) end, Value, Outputs),
       {ok, Sum}.
   
  +%% Internal Functions
  +
  +%% @doc For a given key, remove all metadata entries for that key.
  +remove_entries_for_key(Key, Idx, #state{store=Store, id=Id, previous=Previous}) ->
  +    {ok, {_, Type, Value}} = ?CORE:read(Id, Previous, Store),
  +    lists:foreach(fun(V) ->
  +                case V of
  +                    {Key, _} ->
  +                        {ok, _} = ?CORE:update(Id, {remove, V}, Idx, Store);
  +                    _ ->
  +                        ok
  +                end
  +        end, Type:value(Value)),
  +    ok.
  +
  +%% @doc Add an entry to the index.
  +add_entry(Key, Metadata, Idx, #state{store=Store, id=Id}) ->
  +    {ok, _} = ?CORE:update(Id, {add, {Key, Metadata}}, Idx, Store),
  +    ok.
  
positive.code: 
  -record(state, {store, type, id, previous}).
  
  -define(ID, <<"lasp_riak_keylist_program">>).
  -define(CORE, lasp_core).
  -define(TYPE, riak_dt_orset).
  
  %% @doc Initialize an or-set as an accumulator.
  init(Store) ->
      {ok, Id} = ?CORE:declare(?ID, ?TYPE, Store),
      {ok, #state{store=Store, id=Id}}.
  
  %% @doc Notification from the system of an event.
  process(Object, Reason, Idx, #state{store=Store, id=Id}=State) ->
      Key = riak_object:key(Object),
      case Reason of
          put ->
              {ok, _} = ?CORE:update(Id, {add, Key}, Idx, Store),
              ok;
          delete ->
              {ok, _} = ?CORE:update(Id, {remove, Key}, Idx, Store),
              ok;
          handoff ->
              %% Do nothing, right now.
              ok
      end,
      {ok, State}.
  
negative.code: 
  %% @doc Return the result from a merged response
  value(Merged) ->
      {ok, [K || {K, _} <- ?TYPE:value(Merged)]}.
  
  %% @doc Given a series of outputs, take each one and merge it.
  merge(Outputs) ->
  