[racket] Combining iteration and match
Hi everyone,
I find myself writing lots of expressions such as
(for/list ([temp some-sequence])
(match temp [(list a b) a]))
where I iterate over a sequence and then destructure each element of
the sequence using match, most often to pick some fields out of
a struct. Is there a more compact way to do this? Ideally I'd like
to write
(for/list ([(list a b) some-sequence])
a)
I could probably hack together a suitable macro, but I wonder if there's
already an idiomatic way to handle this situation.
Konrad.