Fixed `splitAt`

It originally misbehaved when given values less than 0, which caused
problems when it recursively called itself.