Magic squares of singly even order: Difference between revisions
→{{header|Haskell}}: (Change tabulation of number thread from sort+group to Map.lookup)
(→{{header|Haskell}}: Tidied, used Map.lookup in lieu of !!) |
(→{{header|Haskell}}: (Change tabulation of number thread from sort+group to Map.lookup)) |
||
Line 468:
let d = (2 * n) + 1 -- LUX table size
startXY = (quot d 2, 0) -- Middle of top row
in
mapAccumR -- Numbering of higher-resolution coordinates
(\a (xy, c) -> (a + 4, luxNums xy c a))
Line 529:
-- Numbered sequence of coordinates -> ordered rows
threadTable w path =
let
in
(axis
-- TESTS ----------------------------------------------------------------------
|