Dear All,

The documentation for syntax-e says that it may return many different
types, including a syntax-pair, but it doesn't really describe why. Here's
a concrete piece of code:

(define stx
  (with-syntax ([x #'5]
                [(y ...) #'(1 2)])
    (syntax (x y ...))))

(syntax->datum stx) returns a list.

(syntax->list stx) (of course) returns a list, too.

But (syntax-e stx) returns a pair! If I do this:

(define stx2
  (with-syntax ([x #'5]
                [y #'(1 2)])
    (syntax (x y))))

I get a list from syntax-e, but of course the nesting is wrong/different.

So my question is: why a pair?

Best,
- Tim (Running Racket v. 5.3.3)
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to