What is 'p' in this example?<br><br>On Wednesday, October 17, 2012, Sam Tobin-Hochstadt wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Oct 16, 2012 at 7:55 PM, Stephen Bloch <<a href="javascript:;" onclick="_e(event, 'cvml', 'bloch@adelphi.edu')">bloch@adelphi.edu</a>> wrote:<br>
>>> Another data point: If "define/match" expands to a "define" of a procedure<br>
>>> that dispatches to a set of implementations based on a pattern-match of<br>
>>> actual arguments... then the name is exactly what I'd expect for such a<br>
>>> feature in a Scheme dialect.<br>
>><br>
>> That is, in fact, exactly what it does.<br>
><br>
> Cool! My students have been writing code that way for years, and I've been telling them "There are languages in which that would work, but Scheme isn't one of them."<br>
><br>
> (define (swap (make-posn x y))<br>
> (make-posn y x))<br>
<br>
The syntax looks like:<br>
<br>
(define/match (swap p)<br>
[(posn x y) (posn y x)])<br>
<br>
--<br>
sam th<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'samth@ccs.neu.edu')">samth@ccs.neu.edu</a><br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote>