[racket] matching behavior in dispatch-rules

From: antoine (antoine.brand at sfr.fr)
Date: Sun Jan 19 05:53:07 EST 2014

Bonjour,

If you expand the code you get :

'(lambda (the-req)
   (syntax-parameterize
    ((bidi-match-going-in? #t))
    (match
     the-req
     ((request/url
       (or #f "get")
       (url/paths (? string? temp1) "foo" (? string? temp3)))
      (test-route the-req temp1 temp3))
     ((request/url
       (or #f "get")
       (url/paths
        (? string? temp4)
        (? (λ (x) (equal? x "bar")) temp5)
        (? string? temp6)))
      (test-route the-req temp4 temp5 temp6))
     (_ (default-else the-req)))))

So litteral string are not bind to any tempX.

I am not sure it answer your question.

Posted on the users mailing list.