The predicate gensym/2 is a traditional predicate to generate unique symbols. It should be used with care.
- gensym(+Base, -Unique)
- Generate <Base>1, <Base>2, etc atoms on each subsequent call. Note that there is nothing that prevents other parts of the application to `invent' the same identifier. The predicate gensym/2 is thread-safe in the sense that two threads generating identifiers from the same Base will never generate the same identifier.
- Reset all gensym counters. Please beware this is dangerous: gensym may be in use by other modules that do not expect their counter to be reset!
- Reset a specific gensym counter. Please beware this still is dangerous as other code may use gensym with the same atom!