(gensym (? tag))
  tag: any type (optional)
  returns a sym
F

Constructs a unique symbol.

The symbol returned from this function is guaranteed to compare unequal to all other symbols. This can be useful for maintaining macro hygiene.

Gensyms cannot be printed or parsed.

backquote has an "auto-gensym" feature which may be more convenient than calling the gensym function directly.

When tag is present, it's converted into a string which is incorporated into the gensym's printed representation. This can be helpful for debugging.

(prn (gensym)) ; prints #<gs:0>
(prn '#<gs:0>) ; error: #<gs:0> is invalid syntax

(prn (gensym 'tagged)) ; prints #<gs:tagged:1>
sym
valid-sym-char?