= Solution
The completed identities are:
``
filter p . map f = map f . filter (p . f)
filter p . concat = concat . map (filter p)
zipWith f = (map (uncurry f) .) . zip
``
The first tests the <predicate> after the mapped function; the second filters each inner <list>. In the third, `zip` is curried: after one argument it still returns a function of a second list. The <operator section> `(map (uncurry f) .)` composes with that returned function. Applying both sides to `xs` and `ys` gives `map (uncurry f) (zip xs ys)`. Omitting the section's extra composition level would not type-check.
Back to article page