aboutsummaryrefslogtreecommitdiff
path: root/aoc2023/src/day2/solve.gleam
diff options
context:
space:
mode:
authorJ.J <thechairman@thechairman.info>2024-05-30 21:47:13 -0400
committerJ.J <thechairman@thechairman.info>2024-05-30 21:47:13 -0400
commitfe088aa5778dcdbaab4dd8d4a7395a91c444b45c (patch)
treef7cd8214ff7db84fce7101908bec2dd7d9ac4a9a /aoc2023/src/day2/solve.gleam
parent87e9ab25ff70e215b537939a4bc23ab101f41dbe (diff)
downloadgleam_aoc-fe088aa5778dcdbaab4dd8d4a7395a91c444b45c.tar.gz
gleam_aoc-fe088aa5778dcdbaab4dd8d4a7395a91c444b45c.zip
gleam 2019
Diffstat (limited to 'aoc2023/src/day2/solve.gleam')
-rw-r--r--aoc2023/src/day2/solve.gleam7
1 files changed, 3 insertions, 4 deletions
diff --git a/aoc2023/src/day2/solve.gleam b/aoc2023/src/day2/solve.gleam
index 38e62d7..608955f 100644
--- a/aoc2023/src/day2/solve.gleam
+++ b/aoc2023/src/day2/solve.gleam
@@ -45,10 +45,9 @@ pub fn part2(input: String) {
green: int.max(green, acc.green),
)
}
- |> list.fold(
- from: 0,
- with: fn(acc, g: Game) { acc + g.red * g.blue * g.green },
- )
+ |> list.fold(from: 0, with: fn(acc, g: Game) {
+ acc + g.red * g.blue * g.green
+ })
}
pub fn main() {