In a java project last year we had to create a board game. A Board had "Piece" objects.
Some pieces can share position. Some don't. The way i solved this in Java was using double dispatch. http://pastebin.com/brrRtqsS (I just extracted the methods out of their respective classes) But i think it is really hard ("or is it complex?") to keep track of whether the dispatching will eventually end, whether I have all the possible cases. What would be an idiomatic way to do something similar in clojure. *doing exactly the same using multimethods? *{:type ::robot :canshare (fn [..] ...)} * ...other Thanks -- 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