Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nullary function arguments to and_then when monad produces None #13

Closed
suned opened this issue Sep 14, 2019 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@suned
Copy link
Owner

suned commented Sep 14, 2019

E.g this should be ok:

from pfun.maybe import Just
def f():
     return Just(1)

Just(None).and_then(f)

I think the only way to provide correct typing for this is to handle it using the mypy plugin.

@suned suned added the enhancement New feature or request label Sep 14, 2019
@suned suned closed this as completed Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant