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

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Wed May 19 07:01:36 EDT 2004

--- Anders Conradi <beque at telia.com> wrote:

> 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

I can confirm this works in MzScheme but displays an
error in DrScheme (in the MzScheme language no less). 
It is due to the call to values with no value
supplied.  Some smaller examples:

> (values)

> (begin (values) 1)
context expected 1 value, received 0 values

> (display (values))
[bug icon] context expected 1 value, received 0 values

I can't explain it, but it only seems to occur when
the value of (values) is used in another expression.

Noel 


=====
Email: noelwelsh <at> yahoo <dot> com
Jabber: noelw <at> jabber <dot> org


	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/


Posted on the users mailing list.