Solution (source code)

= Solution

The most general <type signature> is \b[`scanl :: (b -> a -> b) -> b -> [a] -> [b]`]. The <left fold> step consumes an accumulator of type `b` and an input of type `a`, returning the next accumulator. A <left scan> retains all these accumulator values, including the initial one.