Skip to content

Commit 4b25e23

Browse files
committed
translate the pipe-style codes into comments
1 parent 09a4b7b commit 4b25e23

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

using_pipe.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@ from pipe_fn import e
99
import linq.standard as std
1010

1111
[1, 2, 3] | e / std.general.Sum | e / print
12+
# <=> print(std.general.Sum([1,2, 3]))
1213

1314
[2, 3, -1] | e / std.list.Sort | e / print
15+
# <=> print(std.list.Sort([2, 3, -1]))
1416

1517
{1, 2, 3} | e / std.general.Zip * ([1, 2, 3],) | e / list | e / print
1618

19+
# print(list(zip({1, 2, 3}, [1, 2, 3])))
20+
1721
1 | e / std.general.Then * (lambda x: [x] * 20,) | e / sum | e / print
22+
# <=> print(sum(std.general.Then(1, lambda x: [x] * 20)))
1823

1924
1 | e / std.general.Then * (lambda x: [x] * 20,) + e / sum + e / print
25+
# <=> print(
26+
# and_then(
27+
# std.general.Then,
28+
# lambda x: [x] * 20,
29+
# sum))
2030

2131
```
2232

0 commit comments

Comments
 (0)