Reuse `case-lambda' syntax in optimizer.
This commit is contained in:
parent
92fa4a8d58
commit
d6f1c35e1b
|
@ -49,7 +49,7 @@
|
||||||
(cons (car l)
|
(cons (car l)
|
||||||
(map (optimize) (cdr l)))))
|
(map (optimize) (cdr l)))))
|
||||||
#'([formals e ...] ...))
|
#'([formals e ...] ...))
|
||||||
#:with opt (syntax/loc/origin this-syntax #'op (case-lambda opt-parts ...)))
|
#:with opt (syntax/loc/origin this-syntax #'op (op opt-parts ...)))
|
||||||
(pattern ((~and op (~or (~literal let-values) (~literal letrec-values)))
|
(pattern ((~and op (~or (~literal let-values) (~literal letrec-values)))
|
||||||
([ids e-rhs:expr] ...) e-body:expr ...)
|
([ids e-rhs:expr] ...) e-body:expr ...)
|
||||||
#:with (opt-rhs ...) (syntax-map (optimize) #'(e-rhs ...))
|
#:with (opt-rhs ...) (syntax-map (optimize) #'(e-rhs ...))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user