Description Usage Arguments Details Value See Also
gensym
is an analogue of Common Lisp's gensym, for use in writing
macros. It builds randomly generated symbols which can be made to avoid
shadowing bindings already defined in an environment.
1 |
str |
A string to prepend to the generated symbol name. |
lst |
A list or vector of symbols or strings. These values are guaranteed not to be returned as the generated symbol. |
len |
How long (in characters) the symbol should be. |
gensym
provides some additional control over the form of the symbol
it generates: the user can specify how long the symbol should be (though
asking for length-1 unique symbols is unlikely to be useful), specify a list
of symbols which should be discarded in favor of a new candidate if they are
generated, and ask for a particular string to be prepended for ease of
processing or as even more insurance against name conflicts.
The generated symbol.
The main use of this function is providing temporary symbols that macro
definitions can use to avoid capturing variables from the calling
environment; see macro
and link{defmacro}
for the macro
facility in question.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.