Gotcha. match-pred can be a separate thing.<div><br></div><div>check-match can also let you use the identifiers bound in the match with an optional third argument, which relies on more than match-pred anyway. That's what I'm doing.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 9:30 PM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think it is better to have a check-match since that way people are<br>
more likely to find it.<br>
<span class="HOEnZb"><font color="#888888"><br>
Robby<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Nov 19, 2012 at 7:56 PM, Joe Gibbs Politz <<a href="mailto:joe@cs.brown.edu">joe@cs.brown.edu</a>> wrote:<br>
>> (? P) => (lambda (x) (match x [P true] [_ false]))<br>
><br>
> I like this quite a bit. It wouldn't be crazy to add it as<br>
> match-pred(icate) right next to match-lambda, match-let, and friends<br>
> (<a href="http://docs.racket-lang.org/reference/match.html?q=match&q=match-pred#(form._((lib._racket/match..rkt)._match-lambda))" target="_blank">http://docs.racket-lang.org/reference/match.html?q=match&q=match-pred#(form._((lib._racket/match..rkt)._match-lambda))</a>).<br>
><br>
> Then, for rackunit, it's just up to how much we like writing<br>
><br>
> (check-match foo P)<br>
><br>
> vs.<br>
><br>
> (check-pred (match-pred P) foo)<br>
><br>
> Both seem handy to me.<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
><br>
</div></div></blockquote></div><br></div>