Allow nullary function arguments to and_then when monad produces None
suned opened this issue · comments
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.