Closed suned closed 4 years ago
This could also be used in an eventual effect rotation "god monad" ala ZIO
from pfun.reader import Reader, ask, with_effect from typing import TypeVar, Generator, Any A = TypeVar('A') R = TypeVar('R') Readers = Generator[Reader[R, Any], Any, A] @with_effect def f() -> Readers[str, int]: env = yield ask() reveal_type(env) # should be str
This could also be used in an eventual effect rotation "god monad" ala ZIO