Advent of Functional PHP: Day 10 - Larry Garfield

Planet PHP

Advent of Functional PHP: Day 10

For the 10th Day of Advent of Code, we're asked to solve a matching braces problem. This is a common parser exercise, but it's made a bit more complex in this case by using multiple types of braces. Specifically, we're handling a series of lines that contain ( and ), but also code> and >, [ and ], and { and }.

The story jazzes it up as being the code of our submarine's navigational computer, which consists entirely of braces in a sort of eldritch horror version of brainfuck, but that's mostly just a distraction.

Larry 24 December 2021 - 7:14pm

Читать дальше...