Denys Duchier
This module provides a functional interface for counters
The modules exports 2 constructors:
{Counter.newFromInt +I ?C}
I
{Counter.new ?C}
Each functional counter instance C has the following
features:
{C.get ?I}
I of C
{C.put +I}
C to I
{C.getPut Old New}
Old of C
and sets it to the new value New
{C.next ?I}
I of C and
increments the counter
{C.plus +N}
C by N
{C.times +N}
C by N
{C.clone ?C2}
C2 currently holding the same
integer value as C