Creating Java array of specific type

2010-10-25 Thread Hong Jiang
Hi, I have been able to find answer to this on Google, so here it is: If I have a seq of NameValuePair (a class in Apache HttpClient), how do I get an array of that type (NameValuePair[])? I've tried a few things but always got Object[]. Thanks. --Hong -- You received this message because you

Re: Question about future

2009-11-25 Thread Hong Jiang
ecides to exit, which is why the program would > sit around for 50 seconds > > > > On Wed, Nov 25, 2009 at 10:30 AM, Hong Jiang wrote: > > Thanks for your replies David and Sean. Yes, I made a mistake thinking > > that future takes a function and its arguments, so the functio

Re: Question about future

2009-11-25 Thread Hong Jiang
Thanks for your replies David and Sean. Yes, I made a mistake thinking that future takes a function and its arguments, so the function was never called in my program. On Nov 25, 8:21 am, David Brown wrote: > On Tue, Nov 24, 2009 at 09:04:38PM -0800, Hong Jiang wrote: > >Hi all, > &

Question about future

2009-11-25 Thread Hong Jiang
Hi all, I'm new to Clojure and playing with small programs. Today I wrote a snippet to figure out how future works: (defn testf [] (let [f (future #(do (Thread/sleep 5000) %) 5) g 7] (+ g @f))) (println (testf)) I'm expec