Have you tried (apply my-function [:foo :bar]) yet? Because *apply* is 
exactly what you are looking for; to make sure, read its docstring.

On Tuesday, March 26, 2013 8:44:49 PM UTC+1, Ryan wrote:
>
> Thanks Michael, but If i am not mistaken, your example only works with a 
> vector with two elements. What if we have an unknown number of vector 
> elements?
> My apologies if that wasn't clear on my first post.
>
> On Tuesday, March 26, 2013 9:38:55 PM UTC+2, Michael Klishin wrote:
>>
>>
>> 2013/3/26 Ryan <areka...@gmail.com>
>>
>>> What i am trying to do is to apply the elements of my vector as 
>>> arguments to the function. How can I achieve this?
>>
>>
>> user=> (apply (fn [a b] (println a b)) [:a :b])
>> :a :b
>> nil
>>
>> -- 
>> MK
>>
>> http://github.com/michaelklishin
>> http://twitter.com/michaelklishin
>>  
>

-- 
-- 
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/groups/opt_out.


Reply via email to