AoC 2023, Day 1, Trebuchet
It is the first of December, and that means the start of Advent of Code. I am going to make an attempt at this every day, posting my coding solutions (as much as possible in F#). I will not be posting the questions, as they can be found online, and I will not be posting my final answer.
The first question is called Trebuchet.
Part 1
I will first need a function that will be able to grab the first and last digits from a single row string.
This might be enough to put it all together.
This will have a final result of `142`.
Part 2
To complete part two, I want to first get a function that will extract all digits, and digit words out from a string.
With the input of this will return
This will return
And now I can update the original function to use this
And then I can test with the test input
This returns `281` which is the correct result for the test input.