[racket] as-patterns?

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Mon Sep 2 15:24:51 EDT 2013


Is there a way to bind a name to a whole sub-value being matched in pattern? 

eg. like var at pat in Haskell:
(match l
  [(cons (@ elem (cons a b)) rest) ...elem...])

It must be there somewhere, but I couldn't find it :/


-- Éric

Posted on the users mailing list.