unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using `iter-yield` with `seq.el` and mapping functions?
@ 2022-11-05 21:28 Okamsn
  2022-11-06  0:39 ` Michael Heerdegen
  2022-11-09  1:29 ` Michael Heerdegen
  0 siblings, 2 replies; 8+ messages in thread
From: Okamsn @ 2022-11-05 21:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

Is it possible to use `iter-yield` via mapping functions and `seq.el`
functions? For example, when I do

     (setq iter-maker (iter-lambda (x)
                        (seq-doseq (item x)
                          (iter-yield item))))
     (setq my-iter (funcall iter-maker '(1 2 3)))
     (iter-next my-iter)

I get an error "(void-function cps-internal-yield)".

When I try

     (setq iter-maker (iter-lambda (x)
                        (seq-do #'iter-yield x)))
     (setq my-iter (funcall iter-maker '(1 2 3)))
     (iter-next my-iter)

I get the error "(error "‘iter-yield’ used outside a generator")".

These are both with lexical binding enabled on Emacs 28.1.

Can iterators be used with these functions and other mapping functions,
such as `mapatoms`, `mapc`, and the like?

Thank you.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-09  1:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 21:28 Using `iter-yield` with `seq.el` and mapping functions? Okamsn
2022-11-06  0:39 ` Michael Heerdegen
2022-11-07  2:02   ` Michael Heerdegen
2022-11-07 12:31     ` Emanuel Berg
2022-11-07 14:08       ` Michael Heerdegen
2022-11-07 16:50         ` Emanuel Berg
2022-11-08 22:45           ` Michael Heerdegen
2022-11-09  1:29 ` Michael Heerdegen

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).