I appreciate the solutions others post, it’s helped me learn a lot ![]()
I used a recursive function to build a set of region positions, then iterated over individual fences, building up a map of %{fenceStart => fenceEnd, fenceEnd => fenceStart}.
Pattern matching on maps is really clean.






















