diff options
author | J.J <thechairman@thechairman.info> | 2024-05-30 21:47:13 -0400 |
---|---|---|
committer | J.J <thechairman@thechairman.info> | 2024-05-30 21:47:13 -0400 |
commit | fe088aa5778dcdbaab4dd8d4a7395a91c444b45c (patch) | |
tree | f7cd8214ff7db84fce7101908bec2dd7d9ac4a9a /aoc2023/src/day12/solve.gleam | |
parent | 87e9ab25ff70e215b537939a4bc23ab101f41dbe (diff) | |
download | gleam_aoc-fe088aa5778dcdbaab4dd8d4a7395a91c444b45c.tar.gz gleam_aoc-fe088aa5778dcdbaab4dd8d4a7395a91c444b45c.zip |
gleam 2019
Diffstat (limited to 'aoc2023/src/day12/solve.gleam')
-rw-r--r-- | aoc2023/src/day12/solve.gleam | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/aoc2023/src/day12/solve.gleam b/aoc2023/src/day12/solve.gleam index 06c7098..893b83c 100644 --- a/aoc2023/src/day12/solve.gleam +++ b/aoc2023/src/day12/solve.gleam @@ -41,9 +41,8 @@ fn do_count( case template, groups, left, gap { "", [], 0, _ -> 1 "?" <> t_rest, [g, ..g_rest], 0, False -> - do_count(t_rest, g_rest, g - 1, g == 1, cache) + { - do_count(t_rest, groups, 0, False, cache) - } + do_count(t_rest, g_rest, g - 1, g == 1, cache) + + do_count(t_rest, groups, 0, False, cache) "?" <> t_rest, [], 0, False | "?" <> t_rest, _, 0, True | "." <> t_rest, _, 0, _ -> do_count(t_rest, groups, 0, False, cache) |