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