Earlier, I wrote:
> OK. I'll submit a patch later this week to update the manual with
> information taken from this email thread. Hopefully that will help
> clarify the behavior for others in the future.
Please find the promised patch attached. It's still this week, isn't
it? :-)
As a Guile
Here is an explanation of multiple values by Oleg[0] and an
implementation from the Scheme book[1]. These are more advanced
stuff. Honestly, I usually don't understand what Oleg said. But it is
good to know these references. It is like math, one day when you have
enough background and the right
Mark H Weaver wrote:
> David Kastrup writes:
>
> > Mark H Weaver writes:
> >ument
> >> I'm sorry David, but _everything_ that you wrote below is incorrect.
> >
> > Well, let me try again. It's not all that easy to understand.
>
> You're
Mark H Weaver 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
In the discussion about continuation passing style, I forgot to explain
the semantics of when and how Guile discards extra return values. It's
very simple:
I wrote:
> Here's what (lambda () (list (f 1) (f 2) (f 3))) looks like in CPS,
> using the same evaluation order as I chose above:
>
>
David Kastrup writes:
> Mark H Weaver writes:
>
>> I'm sorry David, but _everything_ that you wrote below is incorrect.
>
> Well, let me try again. It's not all that easy to understand.
You're obviously quite intelligent and knowledgeable, so it's probably
my
Mark H Weaver writes:
> I'm sorry David, but _everything_ that you wrote below is incorrect.
Well, let me try again. It's not all that easy to understand.
> David Kastrup writes:
>
>> Chris Marusich writes:
>>
>>> I think I'm missing
I'm sorry David, but _everything_ that you wrote below is incorrect.
David Kastrup writes:
> Chris Marusich writes:
>
>> I think I'm missing something here. In (list (f)), the call to f
>> certainly looks like it's happening at a position that one might
>>
On 12/06/17 09:55, Neil Jerram wrote:
On 12/06/17 09:19, Chris Marusich wrote:
I think I'm missing something here. In (list (f)), the call to f
certainly looks like it's happening at a position that one might
intuitively call a "tail" position. So, in this case, what disqualifies
f from being
Chris Marusich writes:
> I think I'm missing something here. In (list (f)), the call to f
> certainly looks like it's happening at a position that one might
> intuitively call a "tail" position.
It is, but list does not take multiple values and thus discards
additional
On 12/06/17 09:19, Chris Marusich wrote:
I think I'm missing something here. In (list (f)), the call to f
certainly looks like it's happening at a position that one might
intuitively call a "tail" position. So, in this case, what disqualifies
f from being in tail position? Can you give me an
Hi Mark,
Regarding the Guile-specific behavior where passing multiple values as
an argument to a procedure causes only the first value to be used as the
argument:
> I would recommend against relying on this behavior, mainly because I
> would consider it a bit sloppy. However, I also think it's
Hi Chris,
Chris Marusich writes:
> Mark H Weaver writes:
>
>> Use 'call-with-values', 'let-values', or 'receive' to call a procedure
>> that returns multiple values (or no values).
>>
>> If you do not use one of the above forms (or a macro that expands to
Hi Mark,
Thank you for the detailed response! I learn something new every day.
Mark H Weaver writes:
> Use 'call-with-values', 'let-values', or 'receive' to call a procedure
> that returns multiple values (or no values).
>
> If you do not use one of the above forms (or a
I wrote:
> Use 'call-with-values', 'let-values', or 'receive' to call a procedure
> that returns multiple values (or no values).
>
> If you do not use one of the above forms (or a macro that expands to one
> of them) to call a procedure that returns multiple values, then Guile
> will discard all
Chris Marusich 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?
Yes. Scheme has no concept of a "multiple values" object that can be
given a single name, or passed as a
Chris Marusich 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?
Yes.
> However, I did find the following information in R6RS (Section 5.8:
> "Multiple return values"),
Hi,
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?
Here's an example:
--8<---cut here---start->8---
$ guile
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software
18 matches
Mail list logo