If I need a function to have something like the following signatures,
what's the most idiomatic way to do it:

([fn-arg str-arg vec-arg & others] ...)
([str-arg vec-arg & others] ...)

Background: several functions in clojure.java.jdbc are already
variadic but as part of JDBC-6 I want to enable users to pass in an
optional function to tweak the PreparedStatement before it is
executed. My options seem to be ugly code to test types at the start
of the argument lists or to add in optional keyword arguments at the
end of the argument list (which still means processing the arguments
and doing sort of type testing but which feels a bit cleaner).

http://dev.clojure.org/jira/browse/JDBC-6
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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