Find the missing permutation: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
m →‎Python:Folding XOR over the set of strings: (:Pruned out some scaffolding)
Hout (talk | contribs)
m →‎JS :: XOR: Slight reduction
Line 1,690: Line 1,690:
];
];


return xs.slice(1).reduce(
return xs.reduce(
(a, x) => zipWith(xor)(a)(codes(x)),
(a, x) => zipWith(xor)(a)(codes(x)),
codes(xs[0])
[0, 0, 0, 0]
).map(x => String.fromCodePoint(x)).join('')
).map(x => String.fromCodePoint(x)).join('')
};
};