[toronto-lisp] Pattern Matching in CL

Paul Tarvydas tarvydas at visualframeworksinc.com
Thu Nov 25 19:51:06 UTC 2010

> Do any of you have experience with pattern-matching packages in CL? By this I do not mean only regular expression stuff such as in CL-PPCRE, but rather pattern-matching for function definition as in Haskell, OCaml, the Racket match function, etc. (Although perhaps CL-PPCRE does this also;, but I am only familiar with the string-handling stuff in CL-PPCRE.)
> My question is: If I want to mimic what is possible in Haskell, ML and kin, etc. what is the best CL stuff for pattern matching? I have looked at CL-MATCH but find the documentation a bit hard to penetrate. I am in a bit of a hurry to get something done that pattern matching would really help, so any recommendations are welcome.

At the low end, CL has destructuring-bind as part of the CL spec.

At the high end (?) I've got paip prolog running (under LW) and could give you a copy, or the fixes.

I took a quick look at cl-match - it seems to be what you're asking for, iiuc.  If it's just a syntactical / mind-set issue, you can send me a sample of what you want and we could try to suss out how to express it in cl-match via email...


More information about the toronto-lisp mailing list