Mian-Chowla sequence: Difference between revisions
m
→Functional Python: (simplified structure by slightly enriching type of nextMC)
(→{{header|JavaScript}}: Updated JS for parallel to functional version in Python) |
m (→Functional Python: (simplified structure by slightly enriching type of nextMC)) |
||
Line 1,181:
while True:
yield x
(sumSet, mcs, x) = nextMC(sumSet, mcs, x)
Line 1,200 ⟶ 1,199:
[x + y for y in mcs] + [2 * x]
)
return (setSums, mcs + [x], x)
|