[plt-scheme] example of match quasipattern

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Fri Aug 23 03:10:07 EDT 2002

Jens Axel Søgaard wrote:
> I  expected this to work:
>
>   > (let ([sym 'duck])
>       (match '(duck dog)
>         [`(',sym rest) rest]))
>   . match: no matching clause for (duck dog)
>
> But it doesn't. I just wish I could see why.


Ah. In the quasipattern the sym pattern matches sym.
The value of sym is looked up. That's what you meant
by escaping to scheme.

--
Jens Axel Søgaard





Posted on the users mailing list.