Skip to content

Commit e4bc968

Browse files
authored
docs: typo (#87)
1 parent 9bb680d commit e4bc968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/effectful_but_side_effect_free.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ lookup({'key': '42'}, 'key').and_then(maybe_is_42) # Just('42')
5656
```
5757
(For those with previous functional programming experience, `and_then` is the [bind](https://en.wikipedia.org/wiki/Monad_(functional_programming)#Overview) operation of `Maybe`)
5858

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`:
6060
```python
6161
value = lookup(some_dict, 'key')
6262
if value:

0 commit comments

Comments
 (0)