Thanks, the JIRA issue confused me sightly.

On Sunday, October 5, 2014 8:21:01 PM UTC+2, Ashton Kemerling wrote:
>
> That makes plenty of sense, you passed 1 argument to va1, and it was a 
> list (from &args). If you wish to unwrap that list, use apply:
>
> (apply va1 '(1 2 3))
>
>
>
> On Sun, Oct 5, 2014 at 12:01 PM, Mate Varga <m...@matevarga.net 
> <javascript:>> wrote:
>
>> Hi,
>>
>> there's a closed old bug on the CLJS JIRA from 2012:
>> http://dev.clojure.org/jira/browse/CLJS-383 "Empty variadic argument 
>> initialised with (nil) when using arity overloading 
>> <http://dev.clojure.org/jira/browse/CLJS-383>"
>>
>> I am experiencing completely similar behavior in the latest CLJ 1.6:
>>
>> (defn va1 [& args] args)
>> => (var syn-ws.core/va1)
>> (defn va2 [& args] (va1 args))
>> => (var syn-ws.core/va2)
>> (va2 1 2 3)
>> => ((1 2 3))
>> (va2)
>> => (nil)
>>
>> I.e. variadic arguments are passed as lists, and when they're passed to 
>> another function with variadic arguments then the list is wrapped in 
>> another list. It this the correct behavior?
>>
>> Thanks,
>> Mate
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to