earl-grey
earl-grey copied to clipboard
Allow await (from async functions) in generators
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}