map f xs is the list obtained by applying f to each element of xs, i.e.,
> map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
> map f [x1, x2, ...] == [f x1, f x2, ...]

A combination of parList and map, encapsulating a common pattern:
> parMap strat f = withStrategy (parList strat) . map f

An infix synonym for fmap.

Promote a function to a monad.

A variant of <*> with the arguments reversed.

iterate f x returns an infinite list of repeated applications of f to x:
> iterate f x == [x, f x, f (f x), ...]

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]

filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,
> filter p xs = [ x | x <- xs, p x]

takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p:
> takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
> takeWhile (< 9) [1,2,3] == [1,2,3]
> takeWhile (< 0) [1,2,3] == []

Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:
> f $ g $ h x = f (g (h x))
It is also useful in higher-order situations, such as map ($ 0) xs, or Data.List.zipWith ($) fs xs.

Strict (call-by-value) application, defined in terms of seq.

Applied to a predicate and a list, all determines if all elements of the list satisfy the predicate. For the result to be True, the list must be finite; False, however, results from a False value for the predicate applied to an element at a finite index of a finite or infinite list.

Applied to a predicate and a list, any determines if any element of the list satisfies the predicate. For the result to be False, the list must be finite; True, however, results from a True value for the predicate applied to an element at a finite index of a finite or infinite list.

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.
> return f `ap` x1 `ap` ... `ap` xn
is equivalent to
> liftMn f x1 x2 ... xn

The sortWith function sorts a list of elements using the user supplied function to project something out of each element

This function may be used as a value for Data.Foldable.foldMap in a Foldable instance.

Direct MonadPlus equivalent of filter filter = (mfilter:: (a -> Bool) -> [a] -> [a] applicable to any MonadPlus, for example mfilter odd (Just 1) == Just 1 mfilter odd (Just 2) == Nothing

Sequential function application. The argument is evaluated using the given strategy before it is given to the function.

Parallel function application. The argument is evaluated using the given strategy, in parallel with the function application.

the deep analogue of $!. In the expression f $!! x, x is fully evaluated before the function f is applied to it.

Apply a transformation everywhere in bottom-up manner

Apply a transformation everywhere in top-down manner

Determines whether all elements of the structure satisfy the predicate.

Determines whether any element of the structure satisfies the predicate.

The groupWith function uses the user supplied function which projects an element out of every list element in order to to first sort the input list and then to form groups by equality on these projected elements

Extend a generic query by a type-specific case

until p f yields the result of applying f until p holds.

Type extension of queries for type constructors

ext2Q :: (Data d, Typeable2 t) => (d -> q) -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q) -> d -> q

Type extension of queries for type constructors

Function composition.

Put something inside an HTML element.

(*) `on` f = \x y -> f x * f y.
Typical usage: Data.List.sortBy (compare `on` fst).
Algebraic properties:
* (*) `on` id = (*) (if (*) {¥, const ¥})
* (*) `on` f) `on` g = (*) `on` (f .
* on f . flip on g = flip on (g .
>

Sequential function composition. The result of the second function is evaluated using the given strategy, and then given to the first function.

Parallel function composition. The result of the second function is evaluated using the given strategy, in parallel with the application of the first function.

Sequential inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, and then given to the second function.

Parallel inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, in parallel with the application of the second function.

Make a generic query; start from a type-specific case; return a constant otherwise

> comparing p x y = compare (p x) (p y)
Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:
> ... sortBy (comparing fst) ...

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

This function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions".

Extend a generic transformation by a type-specific case

A fmap-like operator for builder primitives, both bounded and fixed size.
Builder primitives are contravariant so it's like the normal fmap, but backwards (look at the type). (If it helps to remember, the operator symbol is like ($) but backwards.)
We can use it for example to prepend and/or append fixed values to an primitive.
> showEncoding ((\x -> ('\'', (x, '\''))) >$< fixed3) 'x' = "'x'"
>
> fixed3 = char7 >*< char7 >*< char7
Note that the rather verbose syntax for composition stems from the requirement to be able to compute the size / size bound at compile time.

This function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions".

censor f m is an action that executes the action m and applies the function f to its output, leaving the return value unchanged.
* f m = pass (liftM (\x ->
> (x,f))

Make a generic transformation; start from a type-specific case; preserve the term otherwise

ext1T :: (Data d, Typeable1 t) => (forall e. Data e => e -> e) -> (forall f. Data f => t f -> t f) -> d -> d

Type extension of transformations for unary type constructors

ext2T :: (Data d, Typeable2 t) => (forall e. Data e => e -> e) -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> t d1 d2) -> d -> d

Type extension of transformations for unary type constructors