(read-string) converts a string into a Clojure object, which can then be (eval)ed:
(let [f (eval (read-string "(fn [x] (* x 2))"))] (map f [1 2 3])) user=> (2 4 6) So you could do something like: (let [f (eval (read-string (slurp "function.txt")))] (map f [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 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