On Friday, February 21, 2014 9:36:07 PM UTC+1, Joosep Pata wrote:

> #2) def. value in expression, does not work 
> ex = :(x=1) 
> q = quote 
>         function f2($ex) 
>                 x 
>         end 
> end 
> println("does not work") 
> macroexpand(q)|>println 
> eval(q) 
> f2()|>println 
> ~~~ 
>
> 2) gives me 
> > ERROR: syntax: "x=1" is not a valid function argument name 
>

It works if you define ex as :(f(x=1)).args[2]. While superficially 
identical, your expression is a :(=), while this one is a :kw.

—Pierre-Yves

Reply via email to