I'm a clojure newbie, but bear with me; I'm trying to save an expression that contains a function I've defined earlier, and then selectively evaluate it later. (The idea is that I will swap out the function later in the code). Something like
(defn y [a b] (+ a b)) (def x '(y 1 2)) (defn -main [] (println (eval x))) which yields "Unable to resolve symbol: y in this context (NO_SOURCE_FILE:7)" etc. If I do it via the REPL, it works fine, as does using built-in functions as code, eg (def x '(+ 1 2)) (defn -main [] (println (eval x))) yields 3 as expected. What am I missing?
-- 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