Well, that wouldn't work in CL either. What was missing was 'function':
(ps (flet ((foo () 'bar)) (apply #'foo nil)))
=>
"var foo8 = function () { 'bar'; }; foo8.apply(this, null);"
Thanks for the bug report.
Vladimir
On Thu, Jun 4, 2009 at 9:43 AM, sblist@me.com wrote:
Good morning,
FLET and LABELS appears not to work with APPLY. Using regular function application or FUNCALL, the gensymed symbol is used:
PS> (flet ((foo () 'bar)) (foo)) BAR PS> (ps (flet ((foo () 'bar)) (foo))) "var foo1 = function () { 'bar'; }; foo1();"
PS> (ps (flet ((foo () 'bar)) (funcall foo))) "var foo3 = function () { 'bar'; }; foo3();" PS>
APPLY, however, does not use the gensym:
PS> (ps (flet ((foo () 'bar)) (apply foo nil))) "var foo2 = function () { 'bar'; }; foo.apply(this, null);"
- Scott
parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel