Skip to content

Commit 06baab3

Browse files
committed
Fixes docs
1 parent 93e6a71 commit 06baab3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/pages/functions.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,19 @@ For example you sometimes need to ``print()`` values inside your :ref:`pipe`:
5252
5353
>>> result = tap(print)(1) # will print and return 1
5454
1
55-
>>> result == 1
56-
True
55+
>>> assert result == 1
5756
5857
You can also use ``untap`` function to turn any function
59-
return type to ``None`` and still do its thing.
58+
return type to ``None`` and still do its thing"
59+
60+
.. code:: python
61+
62+
>>> from returns.functions import tap, untap
63+
64+
>>> result = untap(tap(print))(1) # will print and return None
65+
1
66+
>>> assert result is None
67+
6068
This is also sometimes helpful for a typed function composition.
6169

6270

0 commit comments

Comments
 (0)