mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Use a foldr instead of apply
This commit is contained in:
parent
949aef875f
commit
542923a250
2 changed files with 7 additions and 3 deletions
2
TODO
2
TODO
|
@ -47,7 +47,7 @@ Tier 1:
|
|||
- puzzle.scm
|
||||
- quicksort.scm
|
||||
- ray.scm - Error: Unable to open file outputs/ray.output. similar issue to above?
|
||||
- read0.scm - Error (line 170, char 25): unable to parse character: x3bb
|
||||
- read0.scm - needs open-input-string
|
||||
- read1.scm
|
||||
- sboyer.scm
|
||||
- scheme.scm - Problem with (macro?) being a primitive and defined in application code
|
||||
|
|
|
@ -981,8 +981,12 @@
|
|||
;; TODO: remove unused locals
|
||||
(define (filter-unused-variables asts lib-exports)
|
||||
(define (do-filter code)
|
||||
(let ((all-fv (apply ;; More efficient way to do this?
|
||||
append ;; Could use delete-duplicates
|
||||
(let ((all-fv ;(apply ;; More efficient way to do this?
|
||||
; append ;; Could use delete-duplicates
|
||||
(foldr
|
||||
(lambda (l ls)
|
||||
(append ls l))
|
||||
'()
|
||||
(map
|
||||
(lambda (ast)
|
||||
(if (define? ast)
|
||||
|
|
Loading…
Add table
Reference in a new issue