> I think negative take/drop should be conceptually viewed as
> prepending/appending "empty"/"bottom"/"default value". It would be nice
> if "take 5 (take -1 some_list)" was equal to "take 4 some_list". (I
> guess it would be more difficult to achieve this with the opposite
> order.)
No. If I want you to put a coin on the table, I will certainly not say:
"Take -1 coins from the table"! You could only take positives amounts of
things. If you want to put things on a list, say put, not take.
Btw, the (current?) rule for take is
take n (take m xs) = take (n `min` m) xs, if n>=0, m>=0
so the "take 5 . take (-1)" is not good being "take 4".
I'm with the option (B): negatives are just outside the domain of
take&drop, and should give you an error message. If take is invoked with
a negative number, and it is not a bug, then you could have invoked
another function. I like what Qrzack said:
"when it unfortunately happens that a type is too big, we notice it and
it does not mean that we should reuse the invalid values for something
else".
Fidel.