simplified foreach loop

This commit is contained in:
Louis Heredero 2023-12-02 12:07:15 +01:00
parent bd84c48a21
commit 8cbe1a8f52

View File

@ -40,9 +40,7 @@ object Puzzle2 {
}
}
minCounts.foreach((p: (String, Int)) => {
power *= p._2
})
minCounts.values.foreach((count: Int) => power *= count)
return power
}