Next highest int from digits: Difference between revisions
m
→{{header|Haskell}}: Labelled two approaches
m (→{{header|Haskell}}: Labelled two approaches) |
|||
Line 232:
=={{header|Haskell}}==
===Permutations===
Defining a list of all (if any) digit-shuffle successors of a positive integer,
in terms of permutations.
Line 286 ⟶ 287:
95322020 -> 1 of 1: [95322200]</pre>
===Minimal digit-swaps===
(The digit-swap approach makes it feasible to obtain successors of this kind for much larger numbers)
|