> Take and drop
> [..]
> I can see three alternatives:
> 
> (A) Make them defined for any n.  If n < 0, do something reasonable:
>       take:   give empty list
>       drop:   give whole list
>
> (B) Make them defined for n > length xs, but fail for n < 0.
>
> (C) Status quo
> 
> PROPOSAL: Use alternative (A)

I vote the same. (A) is in accordance with the view of a list xs as a
function from the interval {0,...,length xs - 1} (with [] as a function from
the empty set {}, and {a,...,b} = {} iff a > b). Then take n xs selects the
defined elements of xs from {0,...,n - 1} and drop n xs those from
{n,...,length xs - 1}. If some other alternative is chosen then this simple
view breaks down.

Bj�rn Lisper

Reply via email to