anchor.diff:  
   
   %% @doc Check that in a list of operations, all of them are correctly typed.
  --spec check_operations(list()) -> ok | {error, {type_check, term()}}.
  +-spec check_operations([op()]) -> ok | {error, {type_check_failed, op()}}.
   check_operations([]) ->
       ok;
   check_operations([Op | Rest]) ->
  
positive.code:     Counter = create_snapshot(Type),
      ?assertEqual(0, Type:value(Counter)),
      Ops = [{non_existing_op_type, {non_existing_op, actor1}}],
      ?assertEqual({error, unexpected_format}, materialize_eager(Type, Counter, Ops)).
  
  %% @doc Testing that the function check_operations works properly
  check_operations_test() ->
  
negative.code:     end.
  
  %% @doc Check that an operation is correctly typed.
  -spec check_operation(op()) -> boolean().
  check_operation(Op) ->
      case Op of
          {update, {_, Type, Update}} ->
              antidote_crdt:is_type(Type) andalso
                  Type:is_operation(Update);
          {read, {_, Type}} ->
              antidote_crdt:is_type(Type);
          _ ->
              false
      end.
  