12345678910111213141516171819202122moduletypeOps=sigtypettype('x,'fn)fnvaladd:('x,t->int->unit)fn(** [add a n] increments the value of the accumulator [a] by [n]. [add]
operations can be performed scalably in parallel. *)valincr:('x,t->unit)fn(** [incr a] is equivalent to [add a 1]. *)valdecr:('x,t->unit)fn(** [decr a] is equivalent to [add a (-1)]. *)valget:('x,t->int)fn(** [get a] returns the current value of the accumulator.
{b CAUTION}: Performing a [get] is expensive and can limit scalability. *)valset:('x,t->int->unit)fn(** [set a n] sets the current value of the accumulator [a] to [n]. *)end