[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple values passed as single argument to procedure

From: David Kastrup
Subject: Re: Multiple values passed as single argument to procedure
Date: Sun, 11 Jun 2017 10:28:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Chris Marusich <address@hidden> writes:

> I've noticed that when one passes multiple values as a single argument
> to a procedure, only the first value gets used.  Is this expected?


> However, I did find the following information in R6RS (Section 5.8:
> "Multiple return values"), which seems possibly relevant:
> "Not all continuations accept any number of values. For example, a
> continuation that accepts the argument to a procedure call is guaranteed
> to accept exactly one value.  The effect of passing some other number of
> values to such a continuation is unspecified."

Guile resolves this unspecification by passing the first value.  Here is
a proposal that tries normalizing the special case of passing zero
values as well:


This "use only the first value in non-multiple-value accepting contexts"
is similar to what Lua uses in the context of "..." argument lists.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]