On Fri, May 13, 2011 at 3:36 PM, Brent Millare <brent.mill...@gmail.com>wrote:
> However, you state here that you will build something more powerful > than predicate dispatch. From the references you cited, I don't > understand how you propose to accomplish this. The first paper says > predicate dispatch is more generalized than pattern matching. > > Best, > Brent The predicate dispatch paper hardwires some details. For example it's not clear to me how they deal with: (match n ([x] :guard [(number? x)] ...) ([0] ...)) But this is a common problem that nothing to do with numbers. Mostly likely their predicate dispatch is hardwired to classes and numbers as I far can tell. By allowing the user to define relationships between predicates we eliminate the hardwiring and are able handle any kind of match like say: (match n ([x] :guard [(number? x)] ...) ([x] :guard [(even? x)]) The even? test must come first. The predicate dispatch paper does not show how to deal with this case at all. David -- 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