gensym

gensym — generates a unique symbol.

Syntax

gensym (prefix_string?)

		

Arguments

prefix_string

A character string which will be used as the prefix for the newly generated symbol.

Returns

A unique symbol.

Description

This function generates a symbol which does not currently exist by attaching a unique number to the end of the prefix_string. If the prefix_string is nil, use a default prefix.

Example

Gamma> gensym("tag");
tag1
Gamma> gensym();
tmp_sym2
Gamma> tag3 = 1;
1
Gamma> gensym("tag");
tag4
Gamma>