You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(For those with previous functional programming experience, `and_then` is the [bind](https://en.wikipedia.org/wiki/Monad_(functional_programming)#Overview) operation of `Maybe`)
58
58
59
-
`pfun.maybe.Maybe` is in fact just a [type-alias](https://docs.python.org/3/library/typing.html#type-aliases) for `Union[Just[TypeVar('A'), Nothing]]`. This means that your type checker can figure out when you're dealing with one or the other using either `__bool__` or `isinstance`, just like when using `Optional`:
59
+
`pfun.maybe.Maybe` is in fact just a [type-alias](https://docs.python.org/3/library/typing.html#type-aliases) for `Union[Just[TypeVar('A')], Nothing]`. This means that your type checker can figure out when you're dealing with one or the other using either `__bool__` or `isinstance`, just like when using `Optional`:
0 commit comments