unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Error using iterators: cps-internal-yield
@ 2018-06-01 16:37 Elias Mårtenson
  2018-06-01 17:20 ` Noam Postavsky
  0 siblings, 1 reply; 2+ messages in thread
From: Elias Mårtenson @ 2018-06-01 16:37 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

I was trying out the new iterator feature, and managed to write a small
test program that gives an error. I presume there is a problem with how the
macro interacts with cl-labels.

Here's the test code:

(iter-defun bar ()
  (cl-labels ((foo ()
                (iter-yield 'a)
                (iter-yield 'b)
                (iter-yield 'c)
                (iter-yield 'd)))
    (foo)
    (foo)))

(let ((x (bar)))
  (loop repeat 8
        collect (iter-next x)))

When run, it gives the following error:

*** Eval error ***  Symbol’s function definition is void: cps-internal-yield

Regards,
Elias

[-- Attachment #2: Type: text/html, Size: 945 bytes --]

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

end of thread, other threads:[~2018-06-01 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-01 16:37 Error using iterators: cps-internal-yield Elias Mårtenson
2018-06-01 17:20 ` Noam Postavsky

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