Is there any better way of doing it? ``` val t: L...
# announcements
w
Is there any better way of doing it?
Copy code
val t: List<(Double) -> Double> // not empty

fun transform(d: Double): Double {
    var temp = d
    t.forEach { temp = it(temp) }
    return temp
}
a
using
fold
w
Ah, thank you so much. Works perfectly.