Kotlin HashSet sumByDouble()
Syntax & Examples


Syntax of HashSet.sumByDouble()

The syntax of HashSet.sumByDouble() extension function is:

fun <T> Iterable<T>.sumByDouble( selector: (T) -> Double ): Double

This sumByDouble() extension function of HashSet returns the sum of all values produced by selector function applied to each element in the collection.