From 7d19748254920b52fe5a64a061285541b231901c Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Wed, 25 Oct 2017 19:26:21 +0200 Subject: [PATCH] finally found it, parens where brackets should have been --- gap/bytable.gi | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gap/bytable.gi b/gap/bytable.gi index c35280b..fd028b6 100644 --- a/gap/bytable.gi +++ b/gap/bytable.gi @@ -408,20 +408,15 @@ InstallOtherMethod(DirectProductOp, function (list, first) local n, item, i, jof, bigtable; n := Length(list); - Print("Hi", n, "\n"); - # Simple checks - Print("Ho", n=0, "\n"); - Print("Ha", n<1, "\n"); - # Why does the following fail? + # Simple checks if n < 1 then Error("Usage: Cannot take DirectProduct of zero items."); + elif n < 2 then + return list[1]; fi; -# if n < 2 then -# return list[1]; -# fi; # See if we can handle all objects for i in [2..n] do - if not HasMultiplicationTable(list(i)) then + if not HasMultiplicationTable(list[i]) then return DirectProductOp(Permuted(list, (1,i)), list[i]); fi; od;