fix bug in `apply' expansion

This commit is contained in:
Matthew Flatt 2012-03-12 15:01:28 -06:00
parent e1a5e032cb
commit 8b5a11a39d
2 changed files with 4 additions and 2 deletions

View File

@ -49,10 +49,11 @@
(ormap (lambda (x) (keyword? (syntax-e x))) l) (ormap (lambda (x) (keyword? (syntax-e x))) l)
#t) #t)
'new-apply-proc 'new-apply-proc
'apply)]) 'apply)]
[(fst) (car (syntax-e stx))])
(datum->syntax (datum->syntax
stx stx
(cons (datum->syntax here app (car l) (car l)) (cons (datum->syntax here app fst fst)
(cdr (syntax-e stx))) (cdr (syntax-e stx)))
stx stx
stx))))))) stx)))))))

View File

@ -77,6 +77,7 @@
(test 12 (if #f + *) 3 4) (test 12 (if #f + *) 3 4)
(syntax-test #'(+ 3 . 4)) (syntax-test #'(+ 3 . 4))
(syntax-test #'(apply + 1 . 2))
(test 8 (lambda (x) (+ x x)) 4) (test 8 (lambda (x) (+ x x)) 4)
(define reverse-subtract (define reverse-subtract