Unspecified value in macro expansion

Create issue
Issue #48 resolved
Takashi Kato repo owner created an issue

This should prints (((mapper v1 (id1 id2)) id1 id2) ((mapper v2 (id1 id2)) id1 id2))

(import (rnrs))

(define-syntax clause-body
  (lambda (x)
    (define build-mapper
      (lambda (vars ids)
    (with-syntax ((vars vars) (ids ids))
              #'(mapper vars ids))))
    (syntax-case x ()
      ((_ (ids ...) (vs ...))
       (with-syntax (((mapper ...)
                      (map (lambda (formals)
                             (build-mapper formals #'(ids ...)))
               #'(vs ...))))
     (display (syntax->datum #'((mapper ids ...) ...))) (newline)
         #'((mapper ids ...) ...))))))

(clause-body (id1 id2) (v1 v2))

Comments (2)

  1. Takashi Kato reporter

    Smaller example

    (import (rnrs))
    
    (define-syntax clause-body
      (lambda (x)
        (syntax-case x ()
          ((_ (ids ...) (vs ...))
           #''((vs ids ...) ...)))))
    (clause-body (id1 id2) (v1 v2))
    
  2. Log in to comment