fix bug in `apply' expansion
This commit is contained in:
parent
e1a5e032cb
commit
8b5a11a39d
|
@ -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)))))))
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user