Hi All,

 I'm looking for a bit of advice for calling a java method which has a
few different signatures (such as Connection.prepareStatement).
 Is there a cleaner way of passing a variable number of arguments to
the method, such as

(apply (memfn prepareStatement) (sql/connection) args)

 or is doing something like the  following the only approach.

(defn prepare-statement
  ([sql] (.prepareStatement (sql/connection) sql))
  ([sql arg] (.prepareStatement (sql/connection) sql arg))
  ([sql arg arg2] (.prepareStatement (sql/connection) sql arg arg2))
  ([sql arg arg2 arg3] (.prepareStatement (sql/connection) sql arg
arg2 arg3)))


Thanks,
 Sean.

--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to