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

Allow await (from async functions) in generators #27

Open
davej opened this issue Aug 6, 2015 · 0 comments
Open

Allow await (from async functions) in generators #27

davej opened this issue Aug 6, 2015 · 0 comments

Comments

@davej
Copy link

davej commented Aug 6, 2015

I think this was discussed before in Gitter but I just wanted to make a note of this here so it wouldn't get lost.

fib = *->
   var {a, b} = {0, 1}
   while true:
      await write-file("/var/fib", a.toString())
      yield a
      {a, b} = {b, a + b}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant