[gambit-list] Confused

Jeff Read bitwize at gmail.com
Sat Oct 16 04:49:06 EDT 2010


On Fri, Oct 15, 2010 at 4:17 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
> It is because "else" is a special keyword that is searched at the head of a clause.  Rebinding "else" will not change the search.  Should it?
>

According to r5rs macro semantics, yes.

Section 4.3.2 says:

"A subform in the input matches a literal identifier if and only if it
is an identifier and either both its occurrence in the macro
expression and its occurrence in the macro definition have the same
lexical binding, or the two identifiers are equal and both have no
lexical binding."

There's also an example in that section about how rebinding the
identifier `=>' influences the behavior of 'cond' under the new
binding.

--Jeff



More information about the Gambit-list mailing list