<div dir="ltr">I am fond of match-define too. The name is a little long, so I use this to get shorter names:<div><div><div><br></div><div>(define-syntax defm (make-rename-transformer #'match-define))</div></div><div><br>
</div><div><span style="font-family:arial,sans-serif;font-size:15.555556297302246px">(for/list ([a+b some-sequence])</span><br style="font-family:arial,sans-serif;font-size:15.555556297302246px"><span style="font-family:arial,sans-serif;font-size:15.555556297302246px"> (defm (list a b) a+b)</span><br style="font-family:arial,sans-serif;font-size:15.555556297302246px">
<span style="font-family:arial,sans-serif;font-size:15.555556297302246px"> a)</span><br></div><div><span style="font-family:arial,sans-serif;font-size:15.555556297302246px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:15.555556297302246px">Another construct with too long a name is define-values:</span></div>
<div><span style="font-family:arial,sans-serif;font-size:15.555556297302246px"><br></span></div><div>(define-syntax defv (make-rename-transformer #'define-values))<span style="font-family:arial,sans-serif;font-size:15.555556297302246px"><br>
</span></div><div><br></div></div><div>/Jens Axel</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">2013/9/3 Asumu Takikawa <span dir="ltr"><<a href="mailto:asumu@ccs.neu.edu" target="_blank">asumu@ccs.neu.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 2013-09-03 11:32:23 +0200, Konrad Hinsen wrote:<br>
> (for/list ([(list a b) some-sequence])<br>
> a)<br>
<br>
</div>I usually use `match-define`:<br>
<br>
(for/list ([a+b some-sequence])<br>
(match-define (list a b) a+b)<br>
a)<br>
<br>
Can be slightly longer than just `match` for simple cases, but doesn't<br>
cause rightward drift.<br>
<br>
Cheers,<br>
Asumu<br>
<div class=""><div class="h5">____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>-- <br>Jens Axel Søgaard<br><br>
</div></div>