guile-user
[Top][All Lists]
Advanced

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

Re: Multiple values passed as single argument to procedure


From: Mark H Weaver
Subject: Re: Multiple values passed as single argument to procedure
Date: Mon, 12 Jun 2017 23:45:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> The reason that (f) is not in tail position with respect to (list (f))
> is because there is still something left to do after calling (f) but
> before invoking the continuation of (list (f)).  The thing remaining to
> do is to apply 'list' to the returned value.
>
> Putting it another way, if (f) evaluates to 5, you cannot proceed by
> reducing (list (f)) to 5.  The continuation of (f) cannot be the same as
> the continuation of (list (f)), because that would skip the step of
> calling 'list'.

FYI, the precise rules for what it means to be in "tail position" are
given in R6RS section 11.20 and R7RS section 3.5.  In those documents,
they call the same concept "tail context".  See:

  http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_sec_11.20

       Mark



reply via email to

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