Advent of Code: Day 1
Stumbled across this problem set Day 1 - Advent of Code 2021
[https://adventofcode.com/2021/day/1]. Problems that
Omg there's a bug here!
It pains me to say I spent about an hour debugging this, thinking through the logic over and over again in the wrong place.
Trivial Monad Example in F#
So how do we solve this? Well a good programmer will recognize the repeated
nested match statements and try to devise a function to abstract this away.
countdays: a template metaprogram
Getting the compiler to count so that calculation isn't done at runtime.