From fe088aa5778dcdbaab4dd8d4a7395a91c444b45c Mon Sep 17 00:00:00 2001 From: "J.J" Date: Thu, 30 May 2024 21:47:13 -0400 Subject: gleam 2019 --- aoc2023/src/day14/solve.gleam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'aoc2023/src/day14') diff --git a/aoc2023/src/day14/solve.gleam b/aoc2023/src/day14/solve.gleam index 1ad1a18..ecc5361 100644 --- a/aoc2023/src/day14/solve.gleam +++ b/aoc2023/src/day14/solve.gleam @@ -23,7 +23,8 @@ fn roll_boulders(strs: List(String)) { fn score(matrix) { use acc, col <- list.fold(matrix, 0) - acc + { + acc + + { use col_acc, char, n <- list.index_fold(list.reverse(col), 0) case char { "O" -> col_acc + n + 1 -- cgit v1.2.3