'(1 2 3) is short for (list 1 2 3)
which is short for (cons 1 (cons 2 (cons 3 null))
which is different from (mcons 1 (mcons 2 (mcons 3 null)))

I hope this helps


On Mon, May 1, 2017 at 1:03 PM, <circularba...@gmail.com> wrote:

> I posted this question on stackoverflow but have not found an answer yet.
> https://stackoverflow.com/questions/43476080/self-
> evaluting-racket-interpreter
>
> I've been trying to write a Racket interpreter that can interpret itself.
>
> interpreter.rkt contains the code for the interpreter. It is pretty
> standard. Then, in interpreter-self-evaluate.rkt, I
>     1. import interpreter.rkt,
>     2. copy paste the code from interpreter.rkt and
>     3. evaluate the code using the eeval function defined in
> interpreter.rkt.
>
> However, this returns an error "; mcdr: contract violation". I suspect
> that the problem is in interpreter-self-evaluate.rkt and that it might have
> something to do with how quote works. I might be completely off base
> though. Any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to