[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
negative indices to take/drop
>From: "Harvey J. Stein" <hjstein@xxxxxxxxx>
>Date: Mon, 4 Jan 1999 12:35:21 +0200
>III. take & drop.
>Again, I agree with Sergei that it is strange to count from the end
>when the index argument is negative.
Depends on how akin you are to APL. :-)
>Does anyone have any examples
>where this would be much more convenient than having 2 sets of fcns -
>one for counting from the beginning & one for counting from the end?
>I don't see any continuity reasons for thinking that (take l -1)
>should be a list containing the last element of l.
One comment I have is that the document doesn't specify what happens
with over-take or over-drop (> (abs n) (length l)).