Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not work as expect with yield hybirds nested yield #3

Open
ukari opened this issue Jun 25, 2022 · 0 comments
Open

not work as expect with yield hybirds nested yield #3

ukari opened this issue Jun 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ukari
Copy link
Owner

ukari commented Jun 25, 2022

example:

(defun* matryoshka (x)
    (yield 1)
    (yield (yield (yield x))))
CL-USER> (defparameter a (matryoshka 2))
A
CL-USER> (funcall (iter-next a))
1
CL-USER> (funcall (iter-next a))
#S(ITER
   :CUR #<CLOSURE (LAMBDA () :IN CL-GENERATOR::GEN-NEXT) {100605E56B}>
   :NEXT NIL)
CL-USER> (funcall (iter-next a) 3)
3
CL-USER> (funcall (iter-next a) 4)
4
CL-USER> (funcall (iter-next a) 5)
5
@ukari ukari added the bug Something isn't working label Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant