gap
gap copied to clipboard
Improve argument checking in `Cycles` and other related functions
Example:
gap> Cycles((1,2,3)(4,5));
Error, List Element: <list>[2] must have an assigned value in
D := arg[2]; at /home/makx/git/gap/master/lib/oprt.gi:2149 called from
<function "Cycles">( <arguments> )
called from read-eval loop at *stdin*:4
type 'quit;' to quit to outer loop
brk>
Also, the documentation is incomplete: It mentions up to three arguments, but actually four can be given.
Also, the same or similar issues seem to affect
PermutationPermutationCycleCycleCycleLengthCycles(the function from the original report)CycleLengthsCycleIndex
A function which seems to be somewhat similar but gets it right is e.g. IsTransitive, which declared using OrbitsishOperation ; I wonder if that or one of its relatives could also be used for the problematic functions mentioned here.
I will take it.