>>> drop 6 "Hello World!" "World!"
>>> drop 3 [1,2,3,4,5] [4,5]
>>> drop 3 [1,2] []
>>> drop 3 [] []
>>> drop (-1) [1,2] [1,2]
>>> drop 0 [1,2] [1,2]
drop n = fromDistinctAscList . drop n . toAscList
drop n = fromDistinctAscList . drop n . toAscList
>>> drop 6 "Hello World!" "World!" >>> drop 3 [1,2,3,4,5] [4,5] >>> drop 3 [1,2] [] >>> drop 3 [] [] >>> drop (-1) [1,2] [1,2] >>> drop 0 [1,2] [1,2]It is an instance of the more general genericDrop, in which n may be of any integral type.
drop 0 = cat drop (m + n) = drop m >-> drop n
\(Shape xs) (List ys) -> Match.drop xs ys == List.drop (length xs) ys
\(Shape xs) (List ys) -> Match.take xs ys ++ Match.drop xs ys == ys
fold (drop n folder) list = fold folder (Data.List.genericDrop n list)
>>> Foldl.fold (Foldl.drop 3 Foldl.sum) [10, 20, 30, 1, 2, 3] 6
>>> Foldl.fold (Foldl.drop 10 Foldl.sum) [10, 20, 30, 1, 2, 3] 0