I had a lot more fun with today's puzzle than yesterday's. I was frustrated with how long it took me to solve a very easy problem yesterday, but most of that time was getting familiar with the Roc language and tooling.

Today, I was able to build on my experience from yesterday and spend more time actually working on solving the problem. It still took me a couple hours... I misread part 2 which led me down a rabbit hole and cost me close to an hour. My solution ended up being super simple.

I'm pretty happy with how this turned out. The actual solution is only a couple lines. Most of the code is tests and parsing.

I definitely miss having a more fully featured standard library like in Elixir or Crystal. Enum.frequencies\1 from Elixir and list.tally from Crystal would have been very helpful for the last couple puzzles.

So far, though, the language has been relatively easy to code in. The syntax is a little strange to me based on what I've used, but I'm mostly used to it now. I think I take for granted the fact that I can code in a way that I am used to in other languages, and I get fast builds and output. I suppose that's the selling point of Roc: Fast, Friendly, Functional!

Looking at other solutions, I would probably lean towards pattern matching rather than string replacement in the future. I could not figure out how to split the string into a list of characters, so this was the first solution that came to mind. I knew from the beginning that I wanted to swap the letters for numbers, so I used that swap to introduce a delimeter that I could split on. It's a little hacky, but actually reads rather elegantly (in my opinion).