package fix

  1. Overview
  2. Docs

Module Fix.GensymSource

Gensym offers a simple facility for generating fresh integer identifiers.

A gensym is a generator of unique integer identifiers.

Sourcetype gensym = unit -> int

make() produces a new gensym.

Sourceval make : unit -> gensym

A slightly more powerful abstraction is a generator whose current state can be inspected (without modification).

Sourcetype generator

generator() creates a new generator. fresh generator causes the generator to create and return a fresh integer identifier. current generator returns the generator's current state, that is, the next available integer identifier.

Sourceval generator : unit -> generator
Sourceval fresh : generator -> int
Sourceval current : generator -> int