Implement spiral_order(matrix) returning the elements of a 2-D list in clockwise spiral order, starting at the top-left. Then implement spiral_fill(n), which builds an n × n matrix filled with 1 … n² in spiral order.
The matrix may be rectangular or empty.