clean lexical declare symbol
Posted: Wed Jan 07, 2015 2:52 pm
I found all lexical declare symbol would contain a records in global symbols table.
When code go back to top level, I think all lexical symbol should *delete* from symbols table. not just set it *nil*.
Code: Select all
>
(define (sub-name lexical-args) (add lexical-args))
(lambda (lexical-args) (add lexical-args))
> (find "lexical-args" (map term (symbols)))
212
> (delete 'lexical-args)
true
> (find "lexical-args" (map term (symbols)))
nil