Some functions that are counterparts of functions from Data.List
using NumericPrelude.Numeric type classes.
They are distinct in that they check for valid arguments,
e.g. the length argument of
take must be at most the length of the input list.
However, since many Haskell programs rely on the absence of such checks,
we did not make these the default implementations
as in NumericPrelude.List.Generic.
Taken number of elements must be at most the length of the list, otherwise the end of the list is undefined.
Dropped number of elements must be at most the length of the list, otherwise the end of the list is undefined.
Split position must be at most the length of the list, otherwise the end of the first list and the second list are undefined.
The index must be smaller than the length of the list, otherwise the result is undefined.
|:: (a -> b -> c)|
function applied to corresponding elements of the lists
Zip two lists which must be of the same length.
This is checked only lazily, that is unequal lengths are detected only
if the list is evaluated completely.
But it is more strict than
zipWithPad undefined f
since the latter one may succeed on unequal length list if
f is lazy.