I want to generate a fn totally at runtime (i.e. the name and the arg symbols are decided at runtime, not in code) What's the best way to achieve this ?
For example how can I implement the following function ?
(defn gen-fn [name arg-symbols body]
...
...
which would be used like this:
(gen-fn "my-func-name" (symbol "x") (symbol "y") (println "this is body. x=" x))
Note that function name, the args and the body are not coded but can be decided at runtime