functor (Name : sig val name : string end) -> sig val next : unit -> int val reset : unit -> unit val get : unit -> int val self : State.t end