Use reduce
with initializer
#1
abersheeran
started this conversation in
Show and tell
Replies: 1 comment
-
With the release of cool 0.3, it's easier to use! import functools
range(10) | F(filter, lambda x: x % 2) | F(functools.reduce, lambda _0, _1: _0 + _1, ..., 10) == 35 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions