Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
alexandria
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Fedorov
alexandria
Commits
e8fbeb9b
Commit
e8fbeb9b
authored
5 years ago
by
lovrolu
Browse files
Options
Downloads
Patches
Plain Diff
Improve WITH-GENSYMS docstring
parent
d44f543c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macros.lisp
+6
-9
6 additions, 9 deletions
macros.lisp
with
6 additions
and
9 deletions
macros.lisp
+
6
−
9
View file @
e8fbeb9b
(
in-package
:alexandria
)
(
in-package
:alexandria
)
(
defmacro
with-gensyms
(
names
&body
forms
)
(
defmacro
with-gensyms
(
names
&body
forms
)
"Binds each variable named by a symbol in NAMES to a unique symbol around
"Binds a set of variables to gensyms and evaluates the implicit progn FORMS.
FORMS. Each of NAMES must either be either a symbol, or of the form:
(symbol string-designator)
Each element within NAMES is either a symbol SYMBOL or a pair (SYMBOL
STRING-DESIGNATOR). Bare symbols are equivalent to the pair (SYMBOL SYMBOL).
Bare symbols appearing in NAMES are equivalent to:
Each pair (SYMBOL STRING-DESIGNATOR) specifies that the variable named by SYMBOL
should be bound to a symbol constructed using GENSYM with the string designated
(symbol symbol)
by STRING-DESIGNATOR being its first argument."
The string-designator is used as the argument to GENSYM when constructing the
unique symbol the named variable will be bound to."
`
(
let
,
(
mapcar
(
lambda
(
name
)
`
(
let
,
(
mapcar
(
lambda
(
name
)
(
multiple-value-bind
(
symbol
string
)
(
multiple-value-bind
(
symbol
string
)
(
etypecase
name
(
etypecase
name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment