Closed sjl closed 11 years ago
use rest...
and ~rest...
to dereference. rest...
is a special case that will have the rest of the expressions bound to it. No need to use @
to dereference it.
Oh god, I figured it out. The name rest...
is somehow magical. If I rename body...
to rest...
it works. Could you maybe document that somewhere?
It is documented in the let
macro example in the macro docs. But yes I need to improve the docs though. Maybe not very clear. Thanks.
Happening to use the name "rest..." in an example is not the same as saying "the name rest... is treated specially". I read the example but just thought you picked "rest" because you felt like it.
On Nov 17, 2012, at 1:44 AM, Santosh Rajan notifications@github.com wrote:
It is documented in the let macro example in the macro docs. But yes I need to improve the docs though. Maybe not very clear. Thanks.
— Reply to this email directly or view it on GitHub.
Yes I will make it explicit in the docs. Thanks.
I'm trying to make a simple macro to save myself some typing:
I expect the
onload
form to expand into something like the last form there, and then get compiled. But when I compile this I get the following javascript:I have no idea what the heck is happening here since Lispyscript macros are a templating language instead of real Lisp macros (and aren't really documented (I think the
~@
char splices?)). Is this a bug or am I doing something wrong?