comp -package:base

Bit-wise complement
Computation strategy to use when scheduling work.
Complement of regular expression
Function composition. Combinator B in https://en.wikipedia.org/wiki/B,_C,_K,_W_system.
Functor composition. Comp f g a is equivalent to f (g a), and the Comp pattern synonym is a way of getting the f (g a) in a Comp f g a. For example, Maybe (IO Bool) is Comp Maybe IO Bool. This is mostly useful for its typeclass instances: in particular, Functor, Applicative, HBifunctor, and Monoidal. This is essentially a version of :.: and Compose that allows for an HBifunctor instance. It is slightly less performant. Using comp . unComp every once in a while will concretize a Comp value (if you have Functor f) and remove some indirection if you have a lot of chained operations. The "free monoid" over Comp is Free, and the "free semigroup" over Comp is Free1.
O(c) compareLength compares the length of a ByteString to an Int64
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.
Compare portions of two arrays. No bounds checking is performed.
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.
The connected components of a graph. Two vertices are connected if there is a path between them, traversing edges in either direction.
Relate the keys of one map to the values of the other, by using the values of the former as keys for lookups in the latter. Complexity: <math>, where <math> is the size of the first argument
compose (fromList [('a', "A"), ('b', "B")]) (fromList [(1,'a'),(2,'b'),(3,'z')]) = fromList [(1,"A"),(2,"B")]
(compose bc ab !?) = (bc !?) <=< (ab !?)
Note: Prior to v0.6.4, Data.IntMap.Strict exposed a version of compose that forced the values of the output IntMap. This version does not force these values.
Relate the keys of one map to the values of the other, by using the values of the former as keys for lookups in the latter. Complexity: <math>, where <math> is the size of the first argument
compose (fromList [('a', "A"), ('b', "B")]) (fromList [(1,'a'),(2,'b'),(3,'z')]) = fromList [(1,"A"),(2,"B")]
(compose bc ab !?) = (bc !?) <=< (ab !?)
Note: Prior to v0.6.4, Data.Map.Strict exposed a version of compose that forced the values of the output Map. This version does not force these values.

Note on complexity

This function is asymptotically optimal. Given n :: Map a b, m :: Map b c, the composition essentially maps each a in n to Maybe c, since the composed lookup yields either one of the c in m or Nothing. The number of possible such mappings is <math>. We now follow a similar reasoning to the one for sorting. To distinguish between <math> possible values, we need <math> bits. Thus, we have a lower bound of <math> bits. Map lookups are comparison-based, and each comparison gives us at most one bit of information: in the worst case we'll always be left with at least half of the remaining possible values, meaning we need at least as many comparisons as we need bits.
Compose two TestReporter ingredients which are then executed in parallel. This can be useful if you want to have two reporters active at the same time, e.g., one which prints to the console and one which writes the test results to a file. Be aware that it is not possible to use composeReporters with a TestManager, it only works for TestReporter ingredients.
computeStatistics computes a summary Statistics for a given state of the StatusMap. Useful in combination with printStatistics.
Relate the keys of one map to the values of the other, by using the values of the former as keys for lookups in the latter. Complexity: <math>, where <math> is the size of the first argument
>>> compose (fromList [('a', "A"), ('b', "B")]) (fromList [(1,'a'),(2,'b'),(3,'z')])
fromList [(1,"A"),(2,"B")]
(compose bc ab !?) = (bc !?) <=< (ab !?)
Fold the immediate children of a Plated container.
composOpFold z c f = foldrOf plate (c . f) z