> Can you let the fn call figure that out for you? Like so:
>
>     (apply (fn ([p1 p2] (new Connection.Configuration p1 p2))
>                ([p1 p2 p3] (new Connection.Configuration p1 p2 p3)))
>            params)
>
> I realize that reflection is probably better in this case, but was
> wondering if this would work.
>

Seems it would.

user> (apply (fn ([ch] (String. ch))
                 ([ch off len] (String. ch off len))) [(char-array [\r
\y \a \n])])
"ryan"
user> (apply (fn ([ch] (String. ch))
                 ([ch off len] (String. ch off len))) [(char-array [\r
\y \a \n]) 0 2])
"ry"

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