I do not know Fare-matcher but the matcher I wrote matches types expressions and is recursive<div><br></div><div>for example:</div><div>; the pattern (:or ((:type number) . this) _) matches a list of numbers</div><div>(match '(1 2 3)</div>
<div>   ((:or ((:type number) . this) _) 'ok))</div><div><br></div><div>also, the keyword this will match the rest of the expression using the current pattern</div><div><br></div><div>Alos, it is possible to bind variables to sub-expression</div>
<div><br></div><div><div>(match '(a 2) ((:x :y) (list x y)) -> (a 2)</div></div><div><div><br></div><div>and you can add types:</div><div><br></div><div>(match '(a 2) (((:var x (:type symbol)) (:var y (:type integer))) (list x y)) -> (a 2)</div>
</div><div><br></div><div>Another feature is that you can embed another matcher, for example:</div><div><br></div><div>(match '(A (2 3 4) A)</div><div>    ((_ (:var ints (:match (:or ((:type number) . this) _))) _)</div>
<div>       ints))</div><div>-> (2 3 4)</div><div><br></div><div>where _ matches any term</div><div><br></div><div>I found that the variables, the self reference and the embedded match adds a lot of power</div><div>the the pattern matching</div>
<div><br></div><div>Another, we can define member? as follows:</div><div><br></div><div> (defun member? (x e) (match e ((:or (:var r (x . _)) (_ . this)) r)))</div><div><br></div><div><br></div><div>I do not know if Fare-match has all this features, but I will try it</div>
<div><br></div><div>Kind regards</div><div>Taoufik</div><div><br><div class="gmail_quote">On Wed, Oct 3, 2012 at 8:47 PM, Robert Goldman <span dir="ltr"><<a href="mailto:rpgoldman@sift.info" target="_blank">rpgoldman@sift.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't mean to discourage you from doing this, if you like, but Faré<br>
already offers his Fare-matcher library for this purpose.<br>
<br>
cheers,<br>
<div class="HOEnZb"><div class="h5">r<br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" target="_blank">http://clozure.com/mailman/listinfo/openmcl-devel</a><br>
</div></div></blockquote></div><br></div>