From: Luke Kenneth Casson Leighton Date: Tue, 26 May 2020 12:45:32 +0000 (+0100) Subject: whoops X-Git-Tag: 24jan2021_ls180~55 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af116fba83e8035ee7f9cee1dec0dee6306da8cf;p=nmutil.git whoops --- diff --git a/src/nmutil/util.py b/src/nmutil/util.py index 3c708bd..3aec9f9 100644 --- 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))