Open ak-1 opened 4 days ago
There are several differences between the Interaction Environment and RnRS environments. This is one of them.
All identifiers not bound in the initial interaction environment and not defined by the programmer are treated as "potentially bound" as variables to facilitate the definition of mutually recursive procedures.
All identifiers not bound in the initial interaction environment and not defined by the programmer are
treated as "potentially bound" as variables to facilitate the definition of mutually recursive procedures.
After reading this I still would not expect this set!
behavior.
I looked at various other scheme implementations. At least racket, guile and mit-scheme all allow mutually recursive definitions like yin
/ yang
in their interaction environments, but do not allow to set!
an unbound identifier.
If this is really intended in ChezScheme, maybe it should be stated explicitly in the user guide.
My expectation was that
However: