Hi, On 6 Mai, 08:22, gary ng <garyng2...@gmail.com> wrote:
> Convention, mostly. Say in the security trading settlement world, they use > terms like T+3 to mean transaction date + 3 days. Which is why I said, toy > DSL. It is used in an implicit context. Everyone in that business knows what > T+3 means. Just like we know what CC means when looking at email. Well, then you might want to look into multimethods (or Protocols if you follow the edge). (ns my.name.space (:refer-clojure :as core :exclude (+))) (defmulti + (fn [x & _] (type x))) (defmethod + Integer [& args] (apply core/+ args)) (defmethod + org.joda.time.DateTime [date & days] (reduce #(.plusDays %1 %2) date days)) Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en