I checked Fare-match and did the following comparisons:<div><br></div><div>examples from file <a href="https://github.com/ebzzry/fare-matcher/blob/master/matcher.lisp">https://github.com/ebzzry/fare-matcher/blob/master/matcher.lisp</a></div>
<div><br></div><div><div>1.  (ifmatch (cons * (cons x y)) '(1 (2 3) 4) (list x y)) :result ((2 3) (4)</div><div>*** (match '(1 (2 3) 4) ((_ . (:x . :y)) (list x y))) :result ((2 3) (4))</div><div>2.  (ifmatch (like-when (cons x y) (eql x y)) '(2 . 2) x) :result 2</div>
<div>*** (match '(2 . 2) ((:x . :x) x)) :result 2</div><div>3.  (ifmatch (and (cons x y) (when (eql x y))) '(2 . 2) x) :result 2</div><div>*** (match '(2 . 2) ((:x . :x) x)) :result 2</div><div>    same as 2. I do not see the difference</div>
<div>4.  (ifmatch (and (cons a 1) (cons 2 b)) '(2 . 1) (list a b)) :result (2 1)</div><div>*** (match '(2 . 1) ((:and (2 . :b) (:a . 1)) (list a b)))<span class="Apple-tab-span" style="white-space:pre">  </span>:result (2 1)</div>
<div>5.  (ifmatch (list a b) '(1 2) (list b a)) :result (2 1)</div><div>*** (match '(1 2) ((:a :b) (list b a))) :result (2 1)</div><div>6.   ((ifmatch (list* a b c) '(1 2 3 4) (list a b c)) :result (1 2 (3 4))</div>
<div>*** (match '(1 2 3 4) ((:a :b . :c) (list a b<span class="Apple-tab-span" style="white-space:pre">     </span>c))) :result (1<span class="Apple-tab-span" style="white-space:pre">     </span>2 (3 4))</div><div>7.  (ifmatch (and x (cons (of-type integer) *)) '(2) x) :result (2)</div>
<div>*** (match '(2) ((:var x ((:type<span class="Apple-tab-span" style="white-space:pre">  </span>integer))) x))<span class="Apple-tab-span" style="white-space:pre">      </span>:result<span class="Apple-tab-span" style="white-space:pre">     </span>(2)</div>
<div>8.   ((let ((res 2))</div><div>       (ifmatch (cons 'reply (cons (value (+ 1 res)) (cons msg 'nil)))</div><div>              '(reply 3 foo) (list res msg)))</div><div><span class="Apple-tab-span" style="white-space:pre">      </span> :result '(2 FOO))</div>
<div>9.   ((let ((res 2))</div><div>       (ifmatch (list 'reply (value (+ 1 res)) msg) '(reply 3 foo)</div><div>         (list res msg)))</div><div>       :result '(2 FOO))</div><div>*** ?</div><div>10.   ((my-length '(1 2 3)) :result 3)))</div>
<div>*** ?</div><div><br></div><div>Regards</div><div>Taoufik</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>