drop -package -text

drop :: Int -> [a] -> [a]
base Prelude, base Data.List
drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs: > 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 Data.List.genericDrop, in which n may be of any integral type.
drop :: Int -> ByteString -> ByteString
bytestring Data.ByteString, bytestring Data.ByteString.Char8
O(1) drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs.
drop :: Int -> Seq a -> Seq a
containers Data.Sequence
O(log(min(i,n-i))). Elements of a sequence after the first i. If i is negative, drop i s yields the whole sequence. If the sequence contains fewer than i elements, the empty sequence is returned.
drop :: Int64 -> ByteString -> ByteString
bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
O(n\c)/ drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs.
dropWhile :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
dropWhile p xs returns the suffix remaining after takeWhile p xs: > dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3] > dropWhile (< 9) [1,2,3] == [] > dropWhile (< 0) [1,2,3] == [1,2,3]
dropDrive :: FilePath -> FilePath
filepath System.FilePath.Windows, filepath System.FilePath.Posix
Delete the drive, if it exists. > dropDrive x == snd (splitDrive x)
dropExtension :: FilePath -> FilePath
filepath System.FilePath.Windows, filepath System.FilePath.Posix
Remove last extension, and the "." preceding it. > dropExtension x == fst (splitExtension x)
dropExtensions :: FilePath -> FilePath
filepath System.FilePath.Windows, filepath System.FilePath.Posix
Drop all extensions > not $ hasExtension (dropExtensions x)
dropFileName :: FilePath -> FilePath
filepath System.FilePath.Windows, filepath System.FilePath.Posix
Drop the filename. > dropFileName x == fst (splitFileName x)
dropTrailingPathSeparator :: FilePath -> FilePath
filepath System.FilePath.Windows, filepath System.FilePath.Posix
Remove any trailing path separators > dropTrailingPathSeparator "file/test/" == "file/test" > Posix: not (hasTrailingPathSeparator (dropTrailingPathSeparator x)) || isDrive x > Posix: dropTrailingPathSeparator "/" == "/" > Windows: dropTrailingPathSeparator "\\" == "\\"
dropWhile :: (Char -> Bool) -> ByteString -> ByteString
bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy.Char8
dropWhile p xs returns the suffix remaining after takeWhile p xs.
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString
bytestring Data.ByteString, bytestring Data.ByteString.Lazy
dropWhile p xs returns the suffix remaining after takeWhile p xs.
dropWhileL :: (a -> Bool) -> Seq a -> Seq a
containers Data.Sequence
O(i) p xs</tt> returns the suffix remaining after takeWhileL p xs.
dropWhileR :: (a -> Bool) -> Seq a -> Seq a
containers Data.Sequence
O(i) p xs</tt> returns the prefix remaining after takeWhileR p xs. dropWhileR p xs is equivalent to reverse (dropWhileL p (reverse xs)).
genericDrop :: Integral i => i -> [a] -> [a]
base Data.List
The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.
unsafeDrop :: Int -> ByteString -> ByteString
bytestring Data.ByteString.Unsafe
A variety of drop which omits the checks on n so there is an obligation on the programmer to provide a proof that 0 <= n <= length xs.