drop -bytestring
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.
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]
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.
O(n) drop n, applied to a Text, returns the suffix of the Text after the first n characters, or the empty Text if n is greater than the length of the Text. Subject to fusion.
O(n) drop n, applied to a Text, returns the suffix of the Text after the first n characters, or the empty Text if n is greater than the length of the Text. Subject to fusion.
O(n) dropAround p t returns the substring remaining after dropping characters that fail the predicate p from both the beginning and end of t. Subject to fusion.
Delete the drive, if it exists.
> dropDrive x == snd (splitDrive x)
Remove last extension, and the "." preceding it.
> dropExtension x == fst (splitExtension x)
Drop all extensions
> not $ hasExtension (dropExtensions x)
Drop the filename.
> dropFileName x == fst (splitFileName x)
A command line tool for resolving dropbox conflicts. Deprecated! Please use confsolve.
Version 0.1.2.1
Remove any trailing path separators
> dropTrailingPathSeparator "file/test/" == "file/test"
> Posix: not (hasTrailingPathSeparator (dropTrailingPathSeparator x)) || isDrive x
> Posix: dropTrailingPathSeparator "/" == "/"
> Windows: dropTrailingPathSeparator "\\" == "\\"
O(n) dropWhileEnd p t returns the prefix remaining after dropping characters that fail the predicate p from the end of t. Examples:
> dropWhileEnd (=='.') "foo..." == "foo"
O(n) dropWhileEnd p t returns the prefix remaining after dropping characters that fail the predicate p from the end of t. Subject to fusion. Examples:
> dropWhileEnd (=='.') "foo..." == "foo"
O(i) p xs</tt> returns the suffix remaining after takeWhileL p xs.
O(1) Return the suffix of the Text, with n Word16 units dropped from its beginning.
If n would cause the Text to begin inside a surrogate pair, the beginning of the suffix will be advanced by one additional Word16 unit to maintain its validity.
The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.
Show more results