day(09): remove lambda from fold
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
1cfee94e2a
commit
c4a4408505
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ fun part2(input: List<List<Int>>): Int {
|
||||||
}
|
}
|
||||||
|
|
||||||
sizes.sortDescending()
|
sizes.sortDescending()
|
||||||
return sizes.take(3).fold(1) { product, n -> n * product }
|
return sizes.take(3).fold(1, Int::times)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
|
|
Loading…
Reference in a new issue