Hi, On 5 Dez., 03:28, hitesh <[EMAIL PROTECTED]> wrote: > (apply .glVertex3f gl point)
In general this is exactly how apply is used. However .foo is special: "functions" starting with a dot are translated into method calls on the first argument. So (.glVertex3f gl x y z) translates is to (. gl glVertex3f x y z). . however is a special form and does not work with apply. Here we have to create some wrapper: (def my-vertex-call #(jcall %1 glVertex3f %2 %3 %4)) (apply my-vertex-call gl [x y z]) More info on this issue can be found in this thread: http://groups.google.com/group/clojure/browse_thread/thread/979d286ecaf21a82/0770c7eec859eb0c?lnk=gst&q=jcall#0770c7eec859eb0c More info on special forms: http://clojure.org/special_forms Note: (Object.) also translates to (new Object). This is also a special form, so similar considerations may apply. Hope this helps. Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---