projects
/
nmutil.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a84a91
)
whoops
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 26 May 2020 12:45:32 +0000
(13:45 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 26 May 2020 12:45:32 +0000
(13:45 +0100)
src/nmutil/util.py
patch
|
blob
|
history
diff --git
a/src/nmutil/util.py
b/src/nmutil/util.py
index 3c708bdfe204bd2614b8d30defcc08a44baf0691..3aec9f954fc0b0b97be0c5cce35eeed074c792b7 100644
(file)
--- a/
src/nmutil/util.py
+++ b/
src/nmutil/util.py
@@
-24,4
+24,5
@@
def treereduce(tree, op, fn):
if len(tree) == 2:
return op(fn(tree[0]), fn(tree[1]))
s = len(tree) // 2 # splitpoint
- return treereduce(op(tree[:s], op, fn), treereduce(tree[s:], op, fn))
+ return op(treereduce(tree[:s], op, fn),
+ treereduce(tree[s:], op, fn))