
14 Oct
2021
14 Oct
'21
4:05 p.m.
As currently defined, `shift x minBound` calls `shiftR` with a negative displacement. This would avoid that: ``` shift x n | n >= 0 = shiftL x n | n == minBound = shiftR (shiftR x maxBound) 1 | otherwise = shiftR x (-n) ``` P.S. Philosophically, `rotate` on a negative `Integer` should do sign extension in the least significant bits (though by the description of `rotate` it should not...). — Sent from my phone with K-9 Mail.