Thank you for telling me that Racket does not support capture and extend
So that I can change direction.
I found that Guile has a function called `local-eval`, which can be used to
Den søn. 7. jun. 2020 kl. 14.09 skrev Siyuan Chen :
Unfortunately, this code doesn't work, because it lacks two functions,
> `get-current-env` and `extends-env`.
These are not available since static lexical scope makes it possible for
the compiler to determine where
a variable is stored at
** Note that this question is not for practical programming, but just play
I want to implement Maybe monad in Racket.
The following code works.
(struct Just (a)
(struct Nothing ()
(define (bigger-than-two n)
(if (> n 2)
Mail list logo