The binding trick seems to work. I had already tried using (in-ns)
before, but didn't realize about needing the binding, so got a nasty
error of course.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
I've hit another mystery (to me), that I hope someone can explain.
Why doesn't the following work?
(defn tst[] (pr 4))
(defn trd[]
(let [f #(eval '(tst))]
(. (Thread. f) start) ))
It seems that a separate thread can not EVAL any defined functions. If
I change the above to remove the
Hello,
Am 08.09.2008 um 20:37 schrieb noahr:
(defn tst[] (pr 4))
(defn trd[]
(let [f #(eval '(tst))]
(. (Thread. f) start) ))
The eval executes the code in the clojure namespace. You have to fully
qualify your tst function. The easiest way to do this to use ` instead
of '. So using `