On Apr 28, 2008, at 3:50 PM, leppie wrote: > So if I understand you correctly syntax-case cannot match the > lambda (or > any other symbols) unless the input is syntax?
To match a symbol as a literal, you need a specific guard like:
> (syntax-case '(lambda (x) foo) () [(kwd (x) y) (eq? #'kwd 'lambda) (list #'x #'y)]) (x foo)
[which works in ikarus, chez, and larceny]
Aziz,,,
On Apr 28, 2008, at 3:50 PM, leppie wrote:
> So if I understand you correctly syntax-case cannot match the
> lambda (or
> any other symbols) unless the input is syntax?
To match a symbol as a literal, you need a specific guard like:
> (syntax-case '(lambda (x) foo) ()
[(kwd (x) y) (eq? #'kwd 'lambda)
(list #'x #'y)])
(x foo)
[which works in ikarus, chez, and larceny]
Aziz,,,