On 6 May 2010 03:38, gary ng <garyng2...@gmail.com> wrote: > > On Wed, May 5, 2010 at 3:18 PM, Meikel Brandmeyer <m...@kotka.de> wrote: >> >> On Wed, May 05, 2010 at 02:56:09PM -0700, gary ng wrote: >> Right now, this can be handled as: >> (ns foo >> (:refer-clojure :as core :exclude (+))) >> >> (defn + >> [matrix1 matrix2] >> ... (core/+ num1 num2) ...) > > Thanks. though it is still a bit limited in the sense that in each ns, there > can only be one implementation of a symbol, though I think that is the > characteristic of all symbol based dynamic language. > I am writing a toy DSL where I would like it to be able to do something like > this: > (+ today 3) => a date which is 3 days from today > (+ 1 2) => 3 > such that the following is possible > (+ today (- 14 remind-prior)) > => 2 weeks from today - a fixed remind before days > => a date when I am going to be reminded for an event 2 weeks from today
Perhaps this is something like what you're looking for? http://richhickey.github.com/clojure-contrib/generic.arithmetic-api.html -- Michael Wood <esiot...@gmail.com> -- 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