Advent of Code 2023 - Day 10

I spent 3 hours struggling in part 2, until I noticed a very basic mistake :joy:

Here’s my code:

https://github.com/Aetherus/advent-of-code/blob/master/2023/day-10.livemd

By the way, the starting position in my puzzle input is adjacent to up and down pipes, so in Part 2 I just treat it as a |.