diff --git a/src/day2/Puzzle2.scala b/src/day2/Puzzle2.scala index 1a90181..8ffdcb2 100644 --- a/src/day2/Puzzle2.scala +++ b/src/day2/Puzzle2.scala @@ -40,9 +40,7 @@ object Puzzle2 { } } - minCounts.foreach((p: (String, Int)) => { - power *= p._2 - }) + minCounts.values.foreach((count: Int) => power *= count) return power }