Skip to content

Commit 0532fc1

Browse files
author
czheo
committed
update README.md
1 parent cb7495a commit 0532fc1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pipe(['google', 'twitter', 'yahoo', 'facebook', 'github'])
103103
- lazy evaluation.
104104
- support infinity.
105105
- support product operation.
106+
- support pipe.
106107

107108
``` python
108109
# CAUTION: this will infinitely print numbers
@@ -124,6 +125,10 @@ print(1 /to/ 10 /drop/ 5)
124125
# print all combinations of [1..3] * [4..6]
125126
print([(x, y) for x, y in (1 /to/ 3) * (4 /to/ 6)])
126127
# return [(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)]
128+
129+
# Now, these infix functions can also be piped
130+
1 /to/ 10 /take/ 5 | each(lambda x: x **2) | print
131+
# [1, 4, 9, 16, 25]
127132
```
128133

129134
Make your own infix function, so you can append multiple items to a list in one line.

0 commit comments

Comments
 (0)