[racket] Combining iteration and match

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Tue Sep 3 09:12:54 EDT 2013

On 2013-09-03 11:32:23 +0200, Konrad Hinsen wrote:
>   (for/list ([(list a b) some-sequence])
>     a)

I usually use `match-define`:

  (for/list ([a+b some-sequence])
    (match-define (list a b) a+b)
    a)

Can be slightly longer than just `match` for simple cases, but doesn't
cause rightward drift.

Cheers,
Asumu

Posted on the users mailing list.