I used sets for Day 16 AOC too. I declared a procedure to retrieve the only
value of a singleton:
proc value(posSet: set[Position]): Position =
for pos in posSet: return pos
RunBut your solution is fine.
I used sets for Day 16 AOC too. I declared a procedure to retrieve the only
value of a singleton:
proc value(posSet: set[Position]): Position =
for pos in posSet: return pos
RunBut your solution is fine.