Hacker News new | ask | show | jobs
by zelphirkalt 1261 days ago
I solved the first 13 days mostly in functional ways [1]. The 2 not functional things I used were arrays and hash tables. OK and outputting things ... .

For arrays I wrote a functional map function, since my language did not have a functional one and I only used it for transforming input, while preserving the original input under a different binding.

For hash tables I could have used functional sets, which I only bothered with in later puzzles, because I wanted to parallelize things.

I did parallelize quite a few things in later puzzles, just because it is so easy to do when you have pure functions.

So at least 26 of 50 puzzles are perfectly possible in functional style.

[1]: https://notabug.org/ZelphirKaltstahl/advent-of-code-2022