Hi,<br><br>I&#39;m trying to match form declarations that can contain optional keyword-followed-by-something (more precisely matching &quot;defforms&quot; declarations).<br>It looks like (id [#:kw1 val1] x [#:kw2 val2] ....) where the [] means optional.<br>

For example the list to match may be &#39;(a b) or &#39;(a #:kw1 1 b) or  &#39;(a b #:kw2 2) or &#39;(a #:kw1 3 b #:kw2 4), etc.<br><br>But I couldn&#39;t figure out how to say &quot;match 2 things one after the other, 0 or 1 time&quot;.<br>

Something like that could do it:<br>(match L<br>  [`(,id ,@(list &#39;#:kw1 v1) ... ,x ,@(list &#39;#:kw2 v2) ...  ....)<br>  ....])<br><br>but nothing I tried got close to it (the ... are quoted and don&#39;t like being unquoted).<br>

Google gave me that result:<br>
<a href="http://stackoverflow.com/questions/7061533/match-form-in-racket-scheme-question-about-matching-sequences">http://stackoverflow.com/questions/7061533/match-form-in-racket-scheme-question-about-matching-sequences</a><br>

but that&#39;s not really what I&#39;m after.<br><br>
Is there any way to do that with match patterns without doing some recurrence over `match&#39; myself (and not writing all the possible composition of with/without each keyword)?<br><br>Thanks,<br>Laurent<br><br>