> On Apr 25, 2016, at 5:05 PM, Matthew Butterick <[email protected]> wrote:

>> I was about to try to apply its awesome power to your example, but I just 
>> realized that in your new example, the s-expression `(id-maker a ZIM b ZAM 
>> c)` isn't actually used in a binding position. Instead the individual ids 
>> within it are used in binding positions. 
> 
> Perhaps I'm misusing the term "binding position". I understand it as "the 
> place where the identifiers sit so they'll get bound". So x and y are in 
> binding positions here:
> 
> (define x 42)
> 
> (let ([y 42])
>  y)

Yes,

> And in my sample binding macro:
> 
> (define-syntax-rule (binding-form _topid (_id ...))
>  (define (_topid)
>    (let ([_id '_id] ...)
>      (displayln (format "~a bound ~a" '_topid _id)) ...)))
> 
> whatever `(id ...)`s are in the second argument will be bound (within `let`) 
> so the second argument position is impliedly a binding position. Wrong?

Each `_id` individually is used in the `let`, but the whole thing, `(_id ...)` 
is not put in any binding position. That's what I meant. The generic-bind 
package has a notion of a binding position, and macros can expand within them. 
So if you were using generic-bind, then each `_id` would be expanded 
individually after being put in its binding position, but the `(_id ...)` 
itself would not.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to