= Solution
Let $F=\mathrm{foldl}\ (\ominus)\ 0$, using the specified operation $u\ominus v=v-u$. Direct evaluation gives $F([])=0$, $F([0])=0$, $F([1])=1$, and $F([1,0])=-1$.
Suppose $F=\mathrm{foldr}\ c\ b$ with the same <integer> result type. The empty <list> forces $b=0$. The two singleton calculations force $c\ 0\ 0=0$ and $c\ 1\ 0=1$. But then
$$
F([1,0])=c\ 1\ (c\ 0\ 0)=c\ 1\ 0=1,
$$
contrary to $F([1,0])=-1$. \b[No such `c,b` exist.] This is the information restriction in the <fold factorisation criterion>: equal folded tails must remain indistinguishable after the same head is attached. A larger, <function>-valued result type can retain the missing information, as the <continuation representation of a left fold> does below.
Back to article page