Home 

cl-match

fast, expressive pattern matching in Common Lisp

user's manual     internal design     download

Pattern matching is a convenient, expressive tool that combines program control and variable binding. Used extensively in the ML family of programming languages, pattern matching allows the application programmer to test values for internal stucture and bind names to pieces of that structure, all in a single expression.

cl-match provides pattern matching with an expressive application interface and an efficient implementation. It includes all the symantic features found in ML pattern matching, plus a few additions: Multiple occurances of individual variables are supported, as are branch-specific guards embedded inside alternative patterns. There's also a convenient extension facility for creating custom patterns.

cl-match doesn't do unification or backtracking, as in Prolog. If you're looking for that functionality, try Screamer or cl-unification. cl-match is based in part on fare-matcher, a pattern-matching library created by Faré Rideau.

cl-match is Copyright © 2008 Daniel S. Bensen. cl-match is released under the terms of the Lisp Lesser GNU Public License, known as the LLGPL.

© 2008 Daniel S. Bensen   Home