Open justinethier opened 9 years ago
Other examples that yield the wrong results:
(define-syntax orr (syntax-rules () ((orelse <expr1> <expr2>) (let ((temp <expr1>)) (if temp temp <expr2>)))))
(let ((if +)) (if (orr 1 1) 10 100)) => 10 instead of 111
(let ((if +)) (if 1 2 3)) => 2 instead of 6
It should be possible to check for this during alpha conversion. For example, do not go into the if?
branch for an expression when there is a local variable if
.
Need to be able to prevent collisions with special form symbols. For example:
Note this should also work without the
let
, in both the compiler and interpreter.