Add foldBy family of functions