Dias Neto, J.
06/09/2018, 12:14 AMpublic inline fun <T, R> Iterable<T>.fold(initial: R, operation: (acc: R, T) -> R): R {
var accumulator = initial
for (element in this) accumulator = operation(accumulator, element)
return accumulator
}
Question: what is the needed of acc variable? it could be only: operation: (R, T) -> R
it is not?