A very straightforward translation of an algorithm to code. I watched a short youtube video and was able to write the code for it. This was a bit fun to implement. I intuitively understand what's going on but I think I need some practice to actually grok it fully to the point where I can see the pattern. I can see the very edges of it but for now that is fine.
Now that I have the conversion, time to write the evaluator. Hopefully with that I can get some semblance of conditionals working in my template engine.