[parenscript-devel] Scoping bug with lambdas

sblist at me.com sblist at me.com
Fri Feb 25 04:09:04 UTC 2011


Hi,

Here's the misbehaviour:

(ps
  (let ((x 5))
    (let ((x 7))
      (funcall (lambda (x) (+ x 9)) x))))

=>

"var x = 5;
var x51 = 7;
(function (x) {
    return x51 + 9;
})(x51);"

Obviously the X inside the lambda body can remain just plain X 
since it is bound in a new scope.

	Scott




More information about the parenscript-devel mailing list