Is it really needed to make a class just to check one thing? A class that serves no purpose but to call a single function using the constructor parameters as its parameters is meaningless. You might as well just turn it into a function is_group(group_set, binary_operation).
(Marking this an issue since inevitably every other language translation will pick this up and it'll be very messy)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It would be nice if you give information about the set and the binary operation used for a test, so that the user can debug more easily.
Shouldn't
group_set
be aset
rather than alist
? Otherwise there can be duplicate elements.Is it really needed to make a class just to check one thing? A class that serves no purpose but to call a single function using the constructor parameters as its parameters is meaningless. You might as well just turn it into a function
is_group(group_set, binary_operation)
.(Marking this an issue since inevitably every other language translation will pick this up and it'll be very messy)