[plt-scheme] Why does (begin ((lambda () (values))) (display "k")) fail?

From: Anders Conradi (beque at telia.com)
Date: Wed May 19 04:19:00 EDT 2004

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



Posted on the users mailing list.