par -package:base package:text

O(n) The partition function takes a predicate and a Text, and returns the pair of Texts with elements which do and do not satisfy the predicate, respectively; i.e.
partition p t == (filter p t, filter (not . p) t)
O(min(n,c)) Compare the count of characters in a Text to a number.
compareLength t c = compare (length t) c
This function gives the same answer as comparing against the result of length, but can short circuit if the count of characters is greater than the number, and hence be more efficient.
O(n) dropAround p t returns the substring remaining after dropping characters that satisfy the predicate p from both the beginning and end of t.
Compare portions of two arrays. No bounds checking is performed.
Exported for testing.
O(n) Compares the count of characters in a string to a number. This function gives the same answer as comparing against the result of lengthI, but can short circuit if the count of characters is greater than the number or if the stream can't possibly be as long as the number supplied, and hence be more efficient.
Determine the ordering relationship between two Sizes, or Nothing in the indeterminate case.
O(min(n,c)) Compare the count of characters in a Text to a number.
compareLength t c = compare (length t) c
This function gives the same answer as comparing against the result of length, but can short circuit if the count of characters is greater than the number, and hence be more efficient.