Magic squares of doubly even order: Difference between revisions
Content deleted Content added
m →JS ES6: (Restored the testing of three orders – 4, 8, 12) |
|||
Line 282:
=={{header|Haskell}}==
<lang Haskell>
magicSquare :: Int -> [[Int]]
Line 315 ⟶ 313:
magicSeries :: Int -> [Bool]
magicSeries n
| n <=
| otherwise = xs ++ (not <$> xs)
where
Line 342 ⟶ 340:
where
square = magicSquare n
(transpose square) ++ -- cols
(diagonals square) -- diagonals
|