Issue #411 - Treat null/improper lists as consts

This commit is contained in:
Justin Ethier 2020-09-22 23:04:28 -04:00
parent 05fc6fb8ed
commit 05d65b15b0

View file

@ -997,6 +997,11 @@
;(newline)
(cond
((const? exp) exp)
;; Null and Improper lists are just consts, no need to expand
((null? exp) exp)
((and (pair? exp)
(not (list? exp)))
exp)
((and (prim? exp) ;; Allow lambda vars to shadown primitives
(not (assoc exp local-renamed)))
exp)