comp

Arrow composition
Wrap a result of fmap
Bit-wise complement
"Smart constructor" for Comp that doesn't require Functor f.
Computation strategy to use when scheduling work.
Deprecated: Use Compose instead
Deprecated: Use Compose instead
Complement of regular expression
Function composition. Combinator B in https://en.wikipedia.org/wiki/B,_C,_K,_W_system.
This module defines the infrastructure necessary to use Compositional Data Types. Compositional Data Types is an extension of Wouter Swierstra's Functional Pearl: Data types a la carte. Examples of usage are bundled with the package in the library examples/Examples.
Computation strategy to use when scheduling work.
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.
Pattern match on and construct a Comp f g a as if it were f (g a).
Use compareLength xs n as a safer and faster alternative to compare (length xs) n. Similarly, it's better to write compareLength xs 10 == LT instead of length xs < 10. While length would force and traverse the entire spine of xs (which could even diverge if xs is infinite), compareLength traverses at most n elements to determine its result.
>>> compareLength [] 0
EQ

>>> compareLength [] 1
LT

>>> compareLength ['a'] 1
EQ

>>> compareLength ['a', 'b'] 1
GT

>>> compareLength [0..] 100
GT

>>> compareLength undefined (-1)
GT

>>> compareLength ('a' : undefined) 0
GT
Reverse all the bits in the argument
x `complementBit` i is the same as x `xor` bit i