Sudoku: Difference between revisions
Content deleted Content added
Stronger types for D entry |
Added post-conditions in D entry |
||
Line 1,507: | Line 1,507: | ||
in { |
in { |
||
assert(problem == removechars(problem[], "^0-9")); |
assert(problem == removechars(problem[], "^0-9")); |
||
} out(result) { |
|||
assert(result == removechars(result[], "^0-9")); |
|||
} body { |
} body { |
||
uint[side ^^ 2] grid = array(map!q{ a - '0' }(problem[])); |
uint[side ^^ 2] grid = array(map!q{ a - '0' }(problem[])); |
||
Line 1,561: | Line 1,563: | ||
in { |
in { |
||
assert(sudo == removechars(sudo[], "^0-9")); |
assert(sudo == removechars(sudo[], "^0-9")); |
||
} out(result) { |
|||
assert(sudo == removechars(result[], "^0-9")); |
|||
} body { |
} body { |
||
string result; |
string result; |