Files
Nim/lib
cui fliter 0ed883ef11 algorithm: handle empty inputs in rotateLeft (#26191)
`rotateLeft` and `rotatedLeft` raised `DivByZeroDefect` for empty
containers because their whole-container overloads computed `dist mod
arg.len` before checking for an empty input.

Handle empty inputs explicitly:

- `rotateLeft` returns `0` and leaves the container unchanged.
- `rotatedLeft` returns an empty sequence.

Add a regression test covering both overloads.

The slice overloads are intentionally left unchanged because zero-length
slice semantics need separate consideration.

Signed-off-by: cuishuang <imcusg@gmail.com>
2026-09-09 10:57:29 +02:00
..
2017-02-20 17:24:19 +02:00
2026-07-30 14:54:12 +02:00
2013-03-16 23:53:07 +01:00
2021-06-03 14:00:53 +02:00