On May 11, 1:39 pm, Alexandre Patry wrote:
> I am trying to call a java method using apply, like :
>
> (apply .println [System/out "hello" "world"])
>
> But I get an error: "Unable to resolve symbol: .println in this context"
>
> Am I missing something?
The apply method takes a Clojure function
On May 11, 1:39 pm, Alexandre Patry wrote:
> I am trying to call a java method using apply, like :
>
> (apply .println [System/out "hello" "world"])
>
> But I get an error: "Unable to resolve symbol: .println in this context"
>
> Am I missing something?
The semantics (meaning of the syntax/code)
On May 11, 2010, at 12:39 PM, Alexandre Patry wrote:
> I am trying to call a java method using apply, like :
>
> (apply .println [System/out "hello" "world"])
>
> But I get an error: "Unable to resolve symbol: .println in this context"
>
> Am I missing something?
Unfortunately, Java methods ar
For now, the idiomatic way to do this is to use the shorthand
anonymous form:
(apply #(.println %) ... )
Of course the example of printing to System.out is fairly well covered
with Clojure API fns anyway...
Stu
I am trying to call a java method using apply, like :
(apply .printl
Le 2010-05-11 13:45, Heinz N. Gies a écrit :
On May 11, 2010, at 19:39 , Alexandre Patry wrote:
I am trying to call a java method using apply, like :
(apply .println [System/out "hello" "world"])
But I get an error: "Unable to resolve symbol: .println in this context"
Am I missing someth
On May 11, 2010, at 19:39 , Alexandre Patry wrote:
> I am trying to call a java method using apply, like :
>
> (apply .println [System/out "hello" "world"])
>
> But I get an error: "Unable to resolve symbol: .println in this context"
>
> Am I missing something?
Apply only works on clojure met
I am trying to call a java method using apply, like :
(apply .println [System/out "hello" "world"])
But I get an error: "Unable to resolve symbol: .println in this context"
Am I missing something?
Thanks,
Alex
--
You received this message because you are subscribed to the Google
Groups "Cloj