Two versions for you are completely equivalent, but useful as comparison points:
(defn -main [& args]
((-> args first symbol resolve)))
and this, using destructuring and ->macro usage:
(defn -main [[fn-name]]
((resolve (symbol fn-name))))
resolve- this is obviously the key. Documents are your friend. :-) Just like an unfair generalization, it is evalalmost never required.
source
share