Getting a block into a list, now we only really need to compare it to a set, assuming the value points are
1..9. A set with length less than a row, column, or block would fail.
This may be a way to limit iteration. You’ll sort it out quicker than me, so have at 'er.
Using my old Othello (Go, Minesweeper, &c.) thinking (writing in BASIC), Blocks 1 through 3 are row 1, columns 1, 4 and 7, and rows 4 and 7 match the same columns. That is the center element of each. All eight branches lead from there, for each block. I’m not convinced slicing is the way to go, but sure you will convince me.
(x - 1, y - 1), (x, y - 1), (x + 1, y - 1),
(x - 1, y), (x, y), (x + 1, y),
(x - 1, y + 1), (x, y + 1), (x + 1, y + 1)
(x, y) is only ever,
((1, 4, 7), (1, 4, 7)).
sure you will convince me
Already done like dinner. I convinced myself. The slice points are right there, once all the syntax is in place.