ToDo:
(defprotocol ICommand (execute [this])) (defrecord LoginCommand [USER] ICommand (execute [this] (println "hello " USER))) (.execute (->LoginCommand "aa"))
(defprotocol ICommand
(execute [this]))
(defrecord LoginCommand [USER]
ICommand
(execute [this] (println "hello " USER)))
(.execute (->LoginCommand "aa"))
(defmulti greeting (fn[x](x :id))) (defmethod greeting 1 [arg] (println "one")) (defmethod greeting 2 [arg] (println "two")) (greeting {:id 2})
(defmulti greeting (fn[x](x :id)))
(defmethod greeting 1 [arg]
(println "one"))
(defmethod greeting 2 [arg]
(println "two"))
(greeting {:id 2})