Skip to content

Allow await (from async functions) in generators #27

@davej

Description

@davej

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions