mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 13:05:05 +02:00
Add enclosing define
This commit is contained in:
parent
16a217abf0
commit
00579b8644
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
;; (loop$14$171 zr$13$170 zi$12$169 c$11$168))
|
;; (loop$14$171 zr$13$170 zi$12$169 c$11$168))
|
||||||
;; #f)
|
;; #f)
|
||||||
|
|
||||||
|
(define (find-named-lets exp)
|
||||||
(define (scan exp)
|
(define (scan exp)
|
||||||
(cond
|
(cond
|
||||||
((ast:lambda? exp)
|
((ast:lambda? exp)
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
(else
|
(else
|
||||||
(map scan exp))))
|
(map scan exp))))
|
||||||
(else exp)))
|
(else exp)))
|
||||||
|
(scan exp))
|
||||||
|
|
||||||
;; Test code follows:
|
;; Test code follows:
|
||||||
(define sexp
|
(define sexp
|
||||||
|
@ -134,7 +136,7 @@
|
||||||
(Cyc-fast-plus c$15$172 1))))))))
|
(Cyc-fast-plus c$15$172 1))))))))
|
||||||
#f))))
|
#f))))
|
||||||
|
|
||||||
(scan
|
(find-named-lets
|
||||||
(ast:sexp->ast
|
(ast:sexp->ast
|
||||||
sexp))
|
sexp))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue