On Dec 11, 6:56 pm, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > I suppose you are Unlogic from IRC. I don't whether you saw it, but I posted > some rough sketch:http://paste.pocoo.org/show/303462/ > > It just introduces the function binding, no other global objects are > introduced. The methods are stored in a map in an atom in the metadata of the > Var of the multimethod. I haven't tested things, though. Implementing isa? > dispatch and other sugar is left as an excercise to the astute reader. ;)
Thanks for your response! Your example is very useful, though I wanted to implement the multimethods without that multi-call layer, so it will look just like an ordinary function. Thanks to Ken Wesson I already have an idea how to do this. > PS: atom may have metadata! For comparison, see also the metadata on the Var. > > user=> (def x (atom 0 :meta {:meta :data})) > #'user/x > user=> (meta x) > {:meta :data} > user=> (meta #'x) > {:ns #<Namespace user>, :name x, :file "NO_SOURCE_PATH", :line 2} Oh, that's my fault, I tried with-meta function on the atom and it wouldn't work. Still, after I defined an atom with some metadata in it, how can I change it thereafter? -- 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