emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master f6b5db6: Add support for generators


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master f6b5db6: Add support for generators
Date: Tue, 03 Mar 2015 23:51:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> As I mentioned a bit further, the explanation about the difference
>> between an iterator and a generator clarifies this, but comes
>> a bit late.
> Right. I'm not sure that level of detail is appropriate for the chapter
> introduction though.

Right.

> I don't have one yet, and that's mostly because the higher-level
> facilities I want to build on top of generators don't exist yet.

Hmm... does that mean that the current code doesn't actually use the
finalizers yet?

> I added one already. Mind leaving it there?

Your choice.

>> Move the unwind-protect and the loop into a separate higher-order function.
> I'm not sure that would help.

The question is only whether it would work.

> We need to keep the `iter-yield' in the body of the calling function
> in order to be correct.

But `iter-yield' is still (lexically) in the body of the calling
function, passed as a callback to some new higher-order function.

I guess another way to ask the same question is to ask if things like

    (mapcar (lambda (x) (iter-yield x)) list)

can be used.


        Stefan



reply via email to

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