[parenscript-devel] Syntax error in treating functions as expressions

Daniel Gackle danielgackle at gmail.com
Mon May 3 23:13:59 UTC 2010


I've finally got back to working through the output of the new PS, and have
hit another couple of errors. The following form:

(lambda (x)
  (apply (lambda (y) (bar (1+ y))) x))

...compiles to...

function (x) {
    return function (y) {
        return bar(y + 1);
    }.apply(this, x);
};

... which is a syntax error. Earlier PS put parentheses around the inner
function, which is correct:

function (x) {
    return (function (y) {
        return bar(y + 1);
    }).apply(this, x);
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20100503/88c93602/attachment.html>


More information about the parenscript-devel mailing list