**take** -base -filepath

*O(1)* take n, applied to a ByteString xs, returns the prefix of xs of length n, or xs itself if n > length xs.
*O(log(min(i,n-i)))*. The first i elements of a sequence. If i is negative, take i s yields the empty sequence. If the sequence contains fewer than i elements, the whole sequence is returned.
*O(n)* take n, applied to a Text, returns the prefix of the Text of length n, or the Text itself if n is greater than the length of the Text. Subject to fusion.
*O(n\*c)/ take n, applied to a ByteString xs, returns the prefix of xs of length n, or xs itself if n > length xs.
*O(n)* take n, applied to a Text, returns the prefix of the Text of length n, or the Text itself if n is greater than the length of the Text. Subject to fusion.
Takes the right number of bytes from the input.

takeWhile, applied to a predicate p and a ByteString xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.
*O(n)* takeWhile, applied to a predicate p and a Text, returns the longest prefix (possibly empty) of elements that satisfy p. Subject to fusion.
takeWhile, applied to a predicate p and a ByteString xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.
*O(i)* applied to a predicate p and a sequence xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.

*O(i)* applied to a predicate p and a sequence xs, returns the longest suffix (possibly empty) of xs of elements that satisfy p.
takeWhileR p xs is equivalent to reverse (takeWhileL p (reverse xs)).
*O(1)* Return the prefix of the Text of n Word16 units in length.
If n would cause the Text to end inside a surrogate pair, the end of the prefix will be advanced by one additional Word16 unit to maintain its validity.
*O(1)* Unchecked take of k Word16s from the front of a Text.
A variety of take which omits the checks on n so there is an obligation on the programmer to provide a proof that 0 <= n <= length xs.