I need to be able to match patterns like this:
‘(PARAMS (x) (lambda (y) (+ x y)))
but the best I can think of returns this:
(match `(PARAMS (x) (lambda (y) (+ x y)))
[`(PARAMS (,var) (lambda (,arg) (,stmt))) 'yep]
[otherise 'nope])
==>
nope
Any advice is appreciated.
Thanks.
Don’t put
,stmtinside parens.(And BTW, all of these questions are Racket specific, so please use the
rackettag.)