Files
kotlin-fork/idea/testData/intentions/loopToCallChain/maxMin/max7.kt.after
T
2021-04-07 07:49:23 +03:00

15 lines
368 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.maxOrNull()'"
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.maxOrNull()'"
import java.lang.Math.max
fun getMaxLineWidth(count: Int): Double {
val <caret>m = (0..count-1)
.map { getLineWidth(it) }
.maxOrNull()
?: 0.0
return m
}
fun getLineWidth(i: Int): Double = TODO()