gensym
gensym( [S_arg] ) =>s_result
Description
Returns a new symbol based on the input argument.
The new symbol’s print name is the result of concatenating the printed representation of the argument, or “G” if no argument is given, and the printed (decimal) representation of a number. The returned new symbol is unique in the sense that it does not exist at the time this function is called.
Arguments
|
String or symbol to be concatenated into a new symbol. If not supplied, the default value is |
Value Returned
Examples
gensym()
=> G5
gensym("test")
=> test6
test7 = 10
=> 10 ;test7 exists now.
gensym('test)
=> test8 ;test7 is skipped.
gensym() == gensym()
=> nil ;Always returns nil.
Related Topics
Return to top