anchor.diff:  %% can be run.
   %%
   %% This doubles as a behavior defining module for the mutators.
  +%%
  +%% == Callbacks ==
  +%%
  +%% A mutator callback must implement 2 function: mutate_put/5 and mutate_get/1.
  +%%
  +%% <code><b>mutate_put(MetaData, Value, ExposedMeta,
  +%% FullObject, BucketProperties) -> Result</b></code>
  +%%
  +%% Types:
  +%% ```
  +%%     MetaData = dict()
  +%%     Value = term()
  +%%     ExposedMeta = dict()
  +%%     FullObject = riak_object:riak_object()
  +%%     BucketProperties = orddict:orddict()
  +%%     Result = {NewMeta, NewValue, NewExposedMeta}
  +%%         NewMeta = dict()
  +%%         NewValue = term()
  +%%         NewExposedMeta = dict()'''
  +%%
  +%% The mutate_put callback is called for each metadata/value pair a riak_object
  +%% has. The return value of NewMeta and NewValue are used by the storage backend
  +%% while the NewExposedMeta is used for the client return where NewMeta would
  +%% normally. The NewExposedMeta is merged with the NewMeta to generate the
  +%% exposed metadata; if the same key is found, the NewExposedMeta value is used.
  +%%
  +%% The mutations are run in the same process as the vnode.
  +%%
  +%% <code><b>mutate_get(Object) -> Result</b></code>
  +%%
  +%% Types:
  +%% ```
  +%%     Object = riak_object:riak_object()
  +%%     Result = riak_object:riak_object() | 'notfound'
  +%% '''
  +%% Take the object from storage and reverse whatever mutation was applied. Note
  +%% the bucket properties are not part of this callback, so if some data is
  +%% important to reverse a mutation, it must be put in the metadata by the
  +%% `mutate_put' function. Also note how the entire object is given as opposed to
  +%% simply a metadata/value pair. Care must be taken not to corrupt the object.
  +%%
  +%% A return of ``'notfound''' stops the mutator chain and returns immediately. This
  +%% provides an escape hatch of sorts; if the mutator cannot reverse the mutation
  +%% effectively, return ``'notfound'''.
   
   -module(riak_kv_mutator).
   
  
positive.code: -export([mutate_put/2, mutate_get/1]).
  
  -callback mutate_put(Meta :: dict(), Value :: any(), ExposedMeta :: dict(), FullObject :: riak_object:riak_object(), BucketProps :: orddict:orddict()) -> {dict(), any(), dict()}.
  -callback mutate_get(FullObject :: riak_object:riak_object()) -> riak_object:riak_object().
  
  -define(DEFAULT_PRIORITY, 0).
  
  register(Module) ->
      ?MODULE:register(Module, ?DEFAULT_PRIORITY).
  
  register(Module, Priority) ->
      Modifier = fun
          (undefined) ->
  
negative.code:     Modules = [M || {_P, M} <- Sorted],
      {ok, Modules}.
  
  %% @doc Unmutate an object after retrieval from storage. When an object is
  %% mutated, the mutators applied are put into the object's metadata.
  -spec mutate_get(Object :: riak_object:riak_object()) -> riak_object:riak_object().
  mutate_get(Object) ->
      [Meta | _] = riak_object:get_metadatas(Object),
      case dict:find(mutators_applied, Meta) of
  