Just to answer some parts of the original question: At Tue, 27 Mar 2018 13:01:54 -0700 (PDT), Justin Pombrio wrote: > I'm surprised by the behavior of using a pattern variable under one set of > ellipses in the pattern, and under two sets of ellipses in the template: > [...] > Is this the expected behavior?
Yes. See this part of the documentation of `syntax`: If a pattern variable is replicated by more <ellipsis>es in a template than the depth marker of its binding, then the pattern variable’s result is determined normally for inner <ellipsis>es (up to the binding’s depth marker), and then the result is replicated as necessary to satisfy outer <ellipsis>es. > And is there a good reason for it? If I remember correctly, I implemented a different behavior first, but switched to be consistent with the `syntax-case` implementation. I also vaguely remember that the switch made things work better. That was a long time ago, though, so I may not remember correctly. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.