[plt-scheme] Why does (begin ((lambda () (values))) (display "k")) fail?
Hi,
I am trying to teach myself scheme, but I stumble on the most basic
expressions.
Why does the following behave as it does? I don't understand the
message about "context expected 1 value, received 0 values". I was
expecting (begin (l) (display "k")) to display k.
If I try the same expression in mzscheme it behaves as I expected.
Welcome to DrScheme, version 206p1.
Language: Standard (R5RS).
> (define l (lambda () (values)))
> (begin (l) (display "k"))
context expected 1 value, received 0 values
> ((lambda () (begin (l) (display "k"))))
k
Grateful for any clues,
// Anders