Fold over a list keeping an n-element history at each step and returning the last result
SequenceFold[f, {x1, …, xn}, {a1, a2, …}]
SequenceFold[f, {x1, …, xn}, {a1, a2, …}, k]
SequenceFold[f, {x, y}, {a, b}]
→ f[y, f[x, y, a], b]SequenceFold[f, {x, y}, {a, b, c}, 4]
→ f[y, f[x, y, a, b], b, c]SequenceFold[f, {x, y}, {a, b, c}]
→ f[f[x, y, a], f[y, f[x, y, a], b], c]