-
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
It might be a good idea to promote https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell idea in IO[] type.
Let's see an example:
from returns.io import IO, impure
@impure
def get_username() -> str:
return input('Hi, what is your name?')
reveal_type(get_username()) # => IO[str]
get_username().split('@') # nope! type error!
get_username().map(lambda name: name.split('@')) # => IO[List[str]]It is important to restrict any access to the internal state of this object.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request