mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
Fix how lambda vars are added to bound var list
This commit is contained in:
parent
e49efe4394
commit
d7bd650cfd
1 changed files with 6 additions and 3 deletions
|
@ -102,7 +102,9 @@
|
||||||
(define (macro:cleanup expr)
|
(define (macro:cleanup expr)
|
||||||
(define (clean expr bv) ;; Bound variables
|
(define (clean expr bv) ;; Bound variables
|
||||||
(newline)
|
(newline)
|
||||||
(display "/* macro:cleanup->clean\n ")
|
(display "/* macro:cleanup->clean, bv =")
|
||||||
|
(write bv)
|
||||||
|
(newline)
|
||||||
(write expr)
|
(write expr)
|
||||||
(newline)
|
(newline)
|
||||||
(display "*/ ")
|
(display "*/ ")
|
||||||
|
@ -128,8 +130,9 @@
|
||||||
((lambda? expr)
|
((lambda? expr)
|
||||||
`(lambda ,(lambda->formals expr)
|
`(lambda ,(lambda->formals expr)
|
||||||
,@(map (lambda (e)
|
,@(map (lambda (e)
|
||||||
(clean e (cons (lambda-formals->list expr)
|
(clean e (append
|
||||||
bv)))
|
(lambda-formals->list expr)
|
||||||
|
bv)))
|
||||||
(lambda->exp expr))))
|
(lambda->exp expr))))
|
||||||
;; At this point defines cannot be in lambda form.
|
;; At this point defines cannot be in lambda form.
|
||||||
;; EG: (define (f x) ...)
|
;; EG: (define (f x) ...)
|
||||||
|
|
Loading…
Add table
Reference in a new issue