anchor.diff:  %%      SnapshotTime: Threshold for the operations to be applied, including the threshold.
   %%      Ops: The list of operations to apply
   %%      Output: The value of the CRDT after applying the operations
  --spec get_snapshot(type(), snapshot_time(), [clocksi_payload()]) -> {ok, snapshot()} | {error, atom()}.
  +-spec get_snapshot(type(), snapshot_time(), [clocksi_payload()]) ->
  +                          {ok, snapshot()} | {error, atom()}.
   get_snapshot(Type, SnapshotTime, Ops) ->
       Init = create_snapshot(Type),
       update_snapshot(Type, Init, SnapshotTime, Ops, ignore).
  
positive.code:     {ok, Snapshot};
  
  update_snapshot(Type, Snapshot, SnapshotTime, [Op|Rest], TxId) ->
      Type = Op#clocksi_payload.type,
      case (is_op_in_snapshot(Op#clocksi_payload.commit_time, SnapshotTime)
            or (TxId =:= Op#clocksi_payload.txid)) of
          true ->
              case Op#clocksi_payload.op_param of
                  {merge, State} ->
                      NewSnapshot = Type:merge(Snapshot, State),
                      update_snapshot(Type,
                                      NewSnapshot,
                                      SnapshotTime,
                                      Rest,
                                      TxId);
                  {Update, Actor} ->
                      case Type:update(Update, Actor, Snapshot) of
                          {ok, NewSnapshot} ->
                              update_snapshot(Type,
                                              NewSnapshot,
                                              SnapshotTime,
                                              Rest,
                                              TxId);
                          {error, Reason} ->
                              {error, Reason}
                      end
              end;
          false ->
              update_snapshot(Type, Snapshot, SnapshotTime, Rest, TxId)
      end.
  
  
negative.code:             false
      end.
  
  %% @doc update_snapshot_eager: apply updates in order without any checks
  -spec update_snapshot_eager(type(), snapshot(), [clocksi_payload()]) -> snapshot().
  update_snapshot_eager(_, Snapshot, []) ->
      Snapshot;
  