kmongo / kotlin.collections / com.mongodb.client.MongoIterable / sumBy

sumBy

inline fun <T> MongoIterable<T>.sumBy(crossinline selector: (T) -> Int): Int (source)

Returns the sum of all values produced by selector function applied to each element in the collection.