> I don’t see why one is better than the other.
I was surprised that the ellipsis which 'x' varies over changes between the
pattern and the template. But it looks like no one else has the same
intuition, so it's fine :-).
> Yes. See this part of the documentation of `syntax`:
That's clear,
> On Mar 27, 2018, at 11:58 PM, Justin Pombrio wrote:
>
> Matthias: the algorithm I was thinking of is the Macro-by-Example algorithm
> that Ryan pointed out, which is neither of yours. Decompose the environment
> at the outer ellipsis. I take back my claim that it's
I think I found a clearer way of talking about this. This rule:
(define-syntax-rule
(test (x y ...) ...)
'(((x y) ...) ...))
Has more than one possible meaning. But it can be clarified using explicit
subscripts. It could mean either this (which is what I expected):
(define-syntax-rule
On 03/27/2018 11:46 PM, Ryan Culpepper wrote:
On 03/27/2018 10:01 PM, 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:
[...]
BTW, it looks like Macro-By-Example[1]
On 03/27/2018 10:01 PM, 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:
|
#lang racket
(require(for-syntax syntax/parse))
(define-syntax (test stx)
(syntax-parse stx
[(_
5 matches
Mail list logo