Skip to content

Commit ad2250d

Browse files
committed
Fixes typos
1 parent a36273d commit ad2250d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/pages/container.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ is used to literally bind two different containers together.
5454
...
5555
5656
result = Success(1).bind(may_fail)
57-
# => Will be equal to either Success[int] or Failure[str]
57+
# => Either Success[int] or Failure[str]
5858
59-
And we use :func:`.map <returns.primitives.container.Container.map>`
59+
And we have :func:`.map <returns.primitives.container.Container.map>`
6060
to use containers with regular functions.
6161

6262
.. code:: python
@@ -67,7 +67,9 @@ to use containers with regular functions.
6767
return state * 2
6868
6969
result = Success(1).map(double)
70-
# => Will be equal to Success(2)
70+
# => Success(2)
71+
result.map(lambda state: state + 1)
72+
# => Success(3)
7173
7274
The same work with built-in functions as well:
7375

@@ -148,7 +150,7 @@ during the pipeline execution:
148150
return state * 2.0
149151
150152
Failure(1).fix(double)
151-
# => Will be equal to Success(2.0)
153+
# => Success(2.0)
152154
153155
``rescue`` should return one of ``Success`` or ``Failure`` types.
154156
It can also rescue your flow and get on the successful track again:
@@ -201,6 +203,7 @@ inner state of containers into a regular types:
201203
# => Traceback (most recent call last): UnwrapFailedError
202204
203205
The most user-friendly way to use ``unwrap`` method is with :ref:`pipeline`.
206+
We even discourage using ``.unwrap()`` without a ``@pipeline``.
204207

205208
For failing containers you can
206209
use :func:`.failure <returns.primitives.container.FixableContainer.failure>`

0 commit comments

Comments
 (0)