You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chez Scheme Version 10.1.0
Copyright 1984-2024 Cisco Systems, Inc.
> (define ls (list 0))
> (define-syntax a
(make-variable-transformer
(lambda (x)
(syntax-case x ()
[id (identifier? #'id) #'(car ls)]
[(set! _ e) #'(set-car! ls e)]
[(_ e ...) #'((car ls) e ...)]))))
> (a 'foo 'bar)
> ls
(bar)
https://scheme.com/tspl4/syntax.html#./syntax:s42
The given example is missing
set!
in the syntax-case literal list:As-is, any form like
(a _ _)
will result in aset!
form.The text was updated successfully, but these errors were encountered: