问题
This is continuation of my previous question Missing argument in syntax-rules Hygienic macro call from Scheme R5RS example
so you can have only this two cases:
- First
(foo bar baz) ...
that can be used as
foo ... ==> (foo_1 _ foo_2 _ foo_3 _)
bar ... ==> (_ bar_1 _ bar_2 _ bar_3 _)
or
(foo bar bar) ...
but what should expand this expression into?
(foo baz) ...
- Second
(foo bar baz ...)
which can be used as baz ...
that expands into ,@(1 2 3)
if input is (anything 0 1 2 3)
.
Are there any other cases? Is this documented somewhere? Or do you need to extract this information from R5RS that don't show any examples of all those cases?
来源:https://stackoverflow.com/questions/61202006/what-are-all-the-cases-of-ellipsis-in-scheme-pattern-matching-hygienic-macros-sy