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