Ray Rahke
05/06/2024, 7:59 AMsumOf
for floats? Here is what intellij shows me the signature is
public inline fun <T> Iterable<T>.sumOf(
selector: (T) -> Double
): Double
for instance, this fails
entries.sumOf {
5f
}
but it works if I do this
entries.sumOf {
5f.toDouble()
}
Joffrey
05/06/2024, 8:02 AMRay Rahke
05/06/2024, 8:04 AMRay Rahke
05/06/2024, 8:04 AMRay Rahke
05/06/2024, 8:04 AMephemient
05/06/2024, 1:04 PM