On Tue 24 May 2011 12:35, Hans Aberg <haber...@telia.com> writes: > On 23 May 2011, at 15:49, Andy Wingo wrote: > >>>> But, it is 1 and 2, currently. (+ FOO) inlines just to FOO, too >>>> optimistically. >>> >>> It is unspecified according to rsr5. >> >> I know. I'm talking about Guile here. > > The Guile manual, sec. 10.2.5.2, says that SCM_UNSPECIFIED is to be used when > the Scheme standard says the return is an unspecified value. > > So this Lisp extension breaks off from that. If one wants it, perhaps, there > should be some way to invoke it.
Hans, you are misreading. (+ 1) is 1 according to the R5RS. (+ "foo") is an error. (+ (values 1 2)) is unspecified, as an instance of returning an unexpected number of values to a continuation, but it is not an instance of the unspecified value. When a continuation that expects one value receives more values than it is expecting -- e.g., the <> in (+ <>) expects one value -- Guile truncates those values to the first one. If such a continuation receives 0 values, Guile signals an error. Andy -- http://wingolog.org/