Update foldl, partial progress bar

foldl now matches the version in the standard library more closely.
WIP