Re: Could not apply function with keyword

2010-07-19 Thread Meikel Brandmeyer
Hi, On Jul 19, 11:13 am, Sanel Zukan wrote: > ...or we could be more explicit and put: > > user=> (apply hash-map :a 1 :b 2 {}) > {:a 1, :b 2} Which looks somehow self-explaining but is wrong in general. Note the difference for a non-empty map. user=> (apply hash-map {:a 1 :b 2}) {[:a 1] [:b 2

Re: Could not apply function with keyword

2010-07-19 Thread Sanel Zukan
Hi, > (apply hash-map :a 1 [:b 2]) or (apply hash-map :a 1 :b 2 nil) ...or we could be more explicit and put: user=> (apply hash-map :a 1 :b 2 {}) {:a 1, :b 2} Best. On Jul 19, 9:00 am, Meikel Brandmeyer wrote: > Hi, > > On Jul 19, 8:56 am, boyan wrote: > > > I have a question about  apply

Re: Could not apply function with keyword

2010-07-19 Thread Michael Wood
On 19 July 2010 09:00, Meikel Brandmeyer wrote: > Hi, > > On Jul 19, 8:56 am, boyan wrote: > >> I have a question about  apply function. >> For examle,create a hash map: >> >> user=> (hash-map :a 1 :b 2) >> {:a 1, :b 2} >> >> It works fine,but if i want to use apply: >> >> user=> (apply hash-map

Re: Could not apply function with keyword

2010-07-19 Thread Meikel Brandmeyer
Hi, On Jul 19, 8:56 am, boyan wrote: > I have a question about  apply function. > For examle,create a hash map: > > user=> (hash-map :a 1 :b 2) > {:a 1, :b 2} > > It works fine,but if i want to use apply: > > user=> (apply hash-map :a 1 :b 2) > java.lang.IllegalArgumentException: Don't know how

Could not apply function with keyword

2010-07-18 Thread boyan
I have a question about apply function. For examle,create a hash map: user=> (hash-map :a 1 :b 2) {:a 1, :b 2} It works fine,but if i want to use apply: user=> (apply hash-map :a 1 :b 2) java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer (NO_SOURCE_FILE:0)