Module Id.Nat_generator


module Nat_generator: Generator  with type t = int
Generators for identifiers in an initial region of the naturals.

A generator g has identifiers in the range 0 .. Nat_generator.count g - 1.


include Id.T
The values generated are unique identifiers.
type generator 
A source of fresh identifiers.
val new_generator : unit -> generator
A new fresh identifier generator.
val fresh : generator -> t
An identifier not previously produced by the generator.
val count : generator -> int
The number of identifiers produced by this generator.


val iter : (t -> unit) -> generator -> unit
Iterate over all identifiers produced by the generator.
val fold : ('a -> t -> 'a) -> 'a -> generator -> 'a
Fold over all identifiers produced by the generator.

Hosted by the SourceForge.net Logo* web site.
*Other names and brands may be claimed as the property of others.