kmongo / kotlin.collections / fold

fold

inline fun <T, R> MongoIterable<T>.fold(initial: R, crossinline operation: (acc: R, T) -> R): R