unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Max Brieiev <max.brieiev@gmail.com>
Cc: 59140@debbugs.gnu.org, okamsn@protonmail.com, monnier@iro.umontreal.ca
Subject: bug#59140: 29.0.50; iter-yield from lambda
Date: Sat, 16 Sep 2023 03:56:35 +0200	[thread overview]
Message-ID: <87cyyianjg.fsf@web.de> (raw)
In-Reply-To: <87v8cb9pns.fsf@gmail.com> (Max Brieiev's message of "Fri, 15 Sep 2023 22:56:07 +0300")

Max Brieiev <max.brieiev@gmail.com> writes:

> For example, this:
>
>     (iter-defun my-generator ()
>       (funcall (lambda () (iter-yield 5))))
>
> would be expanded by iter-defun macro into this:
>
>     (...
>       (let ((gen (iter-lambda () (iter-yield 5))))
>         (iter-next (funcall gen))))
>
> Does it make sense?

Does it?  Isn't the `let' expression equivalent to just `5'?  With other
words: you don't yield from an outside generator, as far as I
understand (or am I wrong? what's the content of your "..."?).

Michael.





  parent reply	other threads:[~2023-09-16  1:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  1:22 bug#59140: 29.0.50; iter-yield from lambda Michael Heerdegen
2023-09-15 19:56 ` Max Brieiev
2023-09-15 22:18   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-16 19:39     ` Max Brieiev
2023-09-16 21:31       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-16  1:56   ` Michael Heerdegen [this message]
2023-09-17  6:32     ` Max Brieiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyyianjg.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=59140@debbugs.gnu.org \
    --cc=max.brieiev@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=okamsn@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).