In clojure 1.2RC1, I wish to obtain a function based on its name as string and evaluate it.
Function definition
(ns my-ns)
(defn mycar [x] (first x))
The following worked:
((ns-resolve *ns* (symbol "mycar")) '(3 4))
((intern *ns* (symbol "mycar")) '(3 4))
((eval (symbol "mycar")) '(3 4))
but they seem ugly. Is there a better way? If not, which of the above is the most idiomatic?