From 20c1782f7865b5f96b1650a65097a0e2bdd1241e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 7 Mar 2014 00:16:52 +0100 Subject: fix and demo cpuonline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util.py') diff --git a/src/util.py b/src/util.py index 9c8c9d5..d42515b 100644 --- a/src/util.py +++ b/src/util.py @@ -98,7 +98,7 @@ def reduce(f, items): @return ¿E? The output ''' if len(items) < 2: - return items + return [] if len(items) == 0 else items[0] rc = items[0] for i in range(1, len(items)): rc = f(rc, items[i]) -- cgit v1.2.3-70-g09d2