2 Type composition

composes functors in to functors and applicative functors (AFs) into AFs. (In contrast, monads do not in general compose.) Composition makes AF-based programming simple and elegant, partly because we don't need an AF counterpart to monad transformers.

Cofunctors (contravariant functors). Great for "consumer" types, just as functors suit "producer" (container) types. There are several composition options.

Type argument flip. Handy for cofunctors: use

Flip (->) o

, for

(-> o)

.

Constructor in pairs:

(f a, g a)

.

Constructor in arrows/functions:

f a ~> g a

.

3 Other features

3.1 Composable bijections

Given all the type constructors and compositions of them, I found myself writing some pretty awkward code to wrap & unwrap through multiple layers. Composable bijections help a lot.