Thanks again!
On Apr 27, 6:41 pm, Richard Lyman <richard.ly...@gmail.com> wrote:
> There's a section on the wiki with almost the exact same title:
>
> http://en.wikibooks.org/wiki/Clojure_Programming/Examples#Invoking_Ja...
>
> If I'm understanding the question correctly that should do what you're
> wanting to do.
>
> -Rich
>
> On Sun, Apr 26, 2009 at 11:50 AM, timc <timgcl...@gmail.com> wrote:
>
> > Thanks Stuart.
>
> > I have figured out another way, which is much more general (and uses
> > the lowest level of how Clojure works).
>
> > (defn evalStr [s] (clojure.lang.Compiler/eval (clojure.lang.RT/
> > readString s)))
>
> > will (attempt to) execute any valid form (i.e. the string that is the
> > source of the form).
>
> > Thus: (evalStr "(+ 1 2)") --> 3
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---