Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fac0ca5

Browse files
Update README.md
1 parent c6bca6e commit fac0ca5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -607,14 +607,14 @@ You can have a look at the real-life [`Functor` interface](https://github.com/dr
607607
>>> _NewFirstType = TypeVar('_NewFirstType')
608608

609609
>>> class Box(SupportKind1['Box', _FirstType], Functor[_FirstType]):
610-
... def __init__(self, inner_value: _FirstType) -> None:
611-
... self._inner_value = inner_value
612-
613-
>>> def map(
614-
... self,
615-
... function: Callable[[_FirstType], _NewFirstType],
616-
... ) -> 'Box[_NewFirstType]':
617-
... return Box(function(self._inner_value))
610+
... def __init__(self, inner_value: _FirstType) -> None:
611+
... self._inner_value = inner_value
612+
...
613+
... def map(
614+
... self,
615+
... function: Callable[[_FirstType], _NewFirstType],
616+
... ) -> 'Box[_NewFirstType]':
617+
... return Box(function(self._inner_value))
618618

619619
>>> assert Box(-5).map(abs) == Box(5)
620620
>>>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /