Today was surprisingly pleasant for me.
My part 1 solution was still a bit messy but I was able to nicely generalize in part 2 and I'm really pleased with my solution.
Also while I initially thought immutability would be really annoying for this, the immutability as a core part of Roc surprisingly aided me with the solution in the end.
https://github.com/ScallyGames/aoc-2024/blob/main/2024/day15.roc#L74-L100
https://github.com/ostcar/aoc2024/blob/main/day15.roc
I am not a fan of my part2. In the end, it was a lot of try and error until the test pass
Part2
Reply for Part 2
https://gist.github.com/PaulStanley/778a7f28141feb2d6ca96ed99dc76310
Part One: ... [41 ms].
Part Two: ... [64 ms]
Re Part 2
Last updated: Jul 06 2025 at 12:14 UTC