For the last point, it isn't needed since the differences between elements should be all positive or all negative for the report to be safe. This is tested with the combination of negate and gradual.
I am also enjoying these Haskell solutions. I'm still learning the language, so it's been cool to compare my solution with these and grow my understanding of Haskell.
For the last point, it isn't needed since the differences between elements should be all positive or all negative for the report to be safe. This is tested with the combination of
negate
andgradual
.I am also enjoying these Haskell solutions. I'm still learning the language, so it's been cool to compare my solution with these and grow my understanding of Haskell.