[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does (eq? car car) ==> () in MacScheme?

In article <1440@uw-nsr.UUCP> john@nsr.bioeng.washington.edu (John Sambrook 548-4386) writes:
>[...]in MacScheme
>it is the case that (eq? car car) ==> ().  [...]
>Could someone please explain what's going on here?  

I can guess at the following explanation:

In MacScheme, Scheme primitives are not really procedures, but when
you reference them, the compiler generates a procedure "wrapper" (i.e.
"car" becomes "(lambda (l) (car l))" 

It does this each time the primitive is used as a value (so each "car"
refers to a different wrapper procedure).  

This behavior is wrong according to R3RS (3/4 of the way into Sect 6.2)

Jeff Siegal