On Thu, Sep 6, 2012 at 1:24 PM, Stayvoid <stayvoid@gmail.com> wrote:
> splitAt (-1) "Foobar"
("","Foobar")

As others have mentioned, this falls out of the way Haskell implements lists; Perl and Python "lists" are more like Vector, and the end of the list is easier to locate and operate on.

It's also worth noting that experience with Perl is that the negative index thing is prone to error (a fencepost error reverses the function's behavior) and Perl 6 has ditched it in favor of a more explicit syntax for the negative index mechanism.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms