On Tue, Aug 9, 2011 at 1:49 AM, David Nolen <dnolen.li...@gmail.com> wrote:
> Ambrose and I have been working on a high performance pattern matching > library for Clojure. There's much left to do but it's already in a place > where it's fun to play around with and we think some of you might even find > it useful even in this early form. > > Some highlights: > > * Literal patterns > * Seq patterns with rest support > * Map patterns, can constrain keys with only > * Bindings can be introduced anywhere a wildcard might appear > * No type constraints on columns > * Lazy pattern matching semantics a la Haskell > > This library implements Maranget's fascinating description for compiling > pattern matching into good decision trees. Suffice to say, this library is > pretty darn fast. > > We look forward to hearing your feedback. For code, more documentation, and > where we are heading you can look here: > > https://github.com/swannodette/match > > David > A quick heads up. We've switched to vectors for seq matching. This brings things in line with Clojure destructuring syntax, but more importantly it frees us to reserve lists for custom syntax. This will allow for things like this: (match [x y] [({1 :b} :as m) _] ...) We'll probably support optimized vector matching like so: (match [x y] [([1 2 & r] :vector) _] ...) 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