Open a11ce opened 2 years ago
This looks like the same issue as #21. Here is an abridged concrete example from a course:
(define (evaluate-complex expr dict)
...
[(eq? operator 'define)
(begin (set! dictionary
(make-binding (second exp)
(evaluate (third exp)
d)
dictionary))
(void))]
...)
(check-satisfied (evaluate '(define a 1)
dictionary)
void?)
Having set!
(etc.) evaluate such that (void? (set! x 1))
may be easier in this case, but if that's unacceptable (per the last comment on #21), it should be explained somewhere that (void)
(the output of set!
in the REPL) is not the same as (void)
(which produces a void value).
The value of calling
set!
appears to be (some form of) void:but doesn't behave as
void
or(void)
:This is causing confusion for students because they have to use something like
(begin (set! x y) (void))
even though it looks unnecessary.