On Sun, Feb 22, 2009 at 4:44 AM, Richard Lyman <richard.ly...@gmail.com> wrote:
[...]
> user=> (defn str-invoke [instance method-str & args]
> (clojure.lang.Reflector/invokeInstanceMethod instance method-str (into-array
> args)))
> #'user/str-invoke
> user=> (def i "sampleString")
> #'user/i
> user=> (def m "substring")
> #'user/m
> user=> (def args [2,3])
> #'user/args
> user=> (str-invoke i m args)
> java.lang.IllegalArgumentException: Unexpected param type (NO_SOURCE_FILE:0)
> user=> (str-invoke i m 2 3)
> "m"
> user=>

user=> (apply str-invoke i m args)
"m"

-- 
Michael Wood <esiot...@gmail.com>

--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to