Introduce fold to algorithm