This PR adds a size parameter to the CList type which allows for rotations to be performed modulo the size. Additionally any call to rotN will result in at most size/2 rotations.
For example, rotN 9999999 (fromList [1..1000000] currently does 9999999 right rotations. With this PR it now does 1 left rotation.
Additionally, rotN 400 (fromList [1,2,3,4]) now does 0 rotations instead of 400.
This PR adds a size parameter to the CList type which allows for rotations to be performed modulo the size. Additionally any call to rotN will result in at most size/2 rotations.
For example,
rotN 9999999 (fromList [1..1000000]
currently does 9999999 right rotations. With this PR it now does 1 left rotation.Additionally,
rotN 400 (fromList [1,2,3,4])
now does 0 rotations instead of 400.Further this means the size function is now O(1).