It will be cool to write effect code using async/await syntax introduced in PEP 492. For example, following code using do decorator:
@dodefeff_func():
r1=yieldEffect(Intent1()) r2=yieldEffect(Intent2(r1))
yielddo_return(r2)
can be written using async/await syntax as:
@do_asyncasyncdefeff_func():
r1=awaitEffect(Intent1()) r2=awaitEffect(Intent2(r1))
returnr2
It will be cool to write effect code using async/await syntax introduced in PEP 492. For example, following code using
dodecorator:can be written using async/await syntax as: