Magic squares of doubly even order: Difference between revisions

Content added Content deleted
Line 425: Line 425:
// truthSeries :: Int -> [Int]
// truthSeries :: Int -> [Int]
const truthSeries = n => {
const truthSeries = n => {
if (n <= 1) return [true, false];
if (n <= 0) return [true];
const xs = truthSeries(n - 1);
const xs = truthSeries(n - 1);
return xs.concat(xs.map(x => !x));
return xs.concat(xs.map(x => !x));