Next highest int from digits: Difference between revisions
m
→Python: Generator: Fix for a premature generator depletion - corrected output
(→{{header|Go}}: Removed superfluous import.) |
m (→Python: Generator: Fix for a premature generator depletion - corrected output) |
||
Line 447:
<lang python>'''Digit-shuffle successors'''
from itertools import chain, islice, permutations, tee
Line 471:
def showSuccs(n):
def go(xs):
harvest = take(5)(ys)
return (
repr(len(harvest)) + ' of ' + repr(len(list(
).rjust(12, ' ') + repr(harvest)
return lambda xs: go(xs)
Line 545 ⟶ 546:
0 -> 0 of 0: []
9 -> 0 of 0: []
12 -> 1 of
21 -> 0 of 0: []
12453 -> 5 of
738440 -> 5 of
45072010 -> 5 of
95322020 -> 1 of
=={{header|REXX}}==
|