You can use the namespace itself as the mapping. For example:
(ns app.commands)
(defn dothis [ args] ...)
(defn dothat [ args] ...)
(ns app)
(defn execute-command [name args]
(let [var (ns-resolve 'app.commands
You can do this using multimethods. defmulti and defmethod will allow you
to do everything you ask for apart from adding a doc-string to each
command. Have a look at:
http://clojuredocs.org/clojure_core/clojure.core/defmulti
On Thursday, May 29, 2014 3:05:56 AM UTC+2, Will Duquette wrote:
If
On Wed, May 28, 2014 at 8:05 PM, Will Duquette w...@wjduquette.com wrote:
If there's a better place to ask this kind of question, please point me in
the right direction!
I'm learning Clojure, and part of the project I'm making is a command
language: the user can type commands at the