We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e6a71 commit 06baab3Copy full SHA for 06baab3
docs/pages/functions.rst
@@ -52,11 +52,19 @@ For example you sometimes need to ``print()`` values inside your :ref:`pipe`:
52
53
>>> result = tap(print)(1) # will print and return 1
54
1
55
- >>> result == 1
56
- True
+ >>> assert result == 1
57
58
You can also use ``untap`` function to turn any function
59
-return type to ``None`` and still do its thing.
+return type to ``None`` and still do its thing"
+
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
68
This is also sometimes helpful for a typed function composition.
69
70
0 commit comments