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
On Tuesday, May 2, 2017 at 2:03:23 AM UTC+8, Jens Axel Søgaard wrote:
> I recommend you change your representation to structures.
>
>
> See new answer:
>
>
> http://stackoverflow.com/a/43723966/23567
>
>
>
> /Jens Axel
>
>
>
>
>
>
> 2017-05-01 19:03 GMT+02:00 :
> I posted this questio
I am somewhat reluctant to use structures as I want to keep the interpreter as
minimal as possible. Also, I'm not familiar enough with the semantics of frames
to implement it in interpreter.rkt.
With regards to mcons being different from cons, Oscar Lopez has suggested that
in stackoverflow. So
Thanks Matthias. I should have read the error message more carefully.
For anyone who is interested, it has nothing to do with cons or mcons or
quotes. There was a mistake in interpreter.rkt.
If you'd like to try finding it yourself, then stop reading.
...
...
...
...
...
...
...
...
...
...
Her
I forgot to mention that for some reason, using the builtin foldl doesn't work
but if I define it myself separately, then it works.
(define (foldl proc init lst)
(cond
((null? lst) init)
(else (foldl proc (proc (car lst) init) (cdr lst)
--
You received this message becaus
5 matches
Mail list logo