package fix

  1. Overview
  2. Docs

Module Fix.GensymSource

This module offers a simple facility for generating fresh integer identifiers.

Sourcetype gensym = unit -> int

A gensym is a generator of unique integer identifiers.

Sourceval make : unit -> gensym

make() produces a new gensym.

Sourcetype generator

A generator whose current state can be inspected (but not modified).

Sourceval generator : unit -> generator

generator() creates a new generator.

Sourceval fresh : generator -> int

fresh g causes the generator g to create and return a fresh integer identifier.

Sourceval current : generator -> int

current g returns the current state of the generator g, that is, the next available integer identifier.

OCaml

Innovation. Community. Security.