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
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
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
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
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)