Permutations: Difference between revisions
m
→An Uncommon Ordering: oops, typo
m (→An Uncommon Ordering: oops, typo) |
m (→An Uncommon Ordering: oops, typo) |
||
Line 7,376:
::<code>[ 3 1 0 2 ]</code>
::<code>[ 3 1 2 0 ]</code>
by stuffing the
The code start with a nest of all the permutations of 0 items <code>[ [ ] ]</code>, and each time though the outer <code>times</code> loop (i.e. 4 times in the example) it takes each of the permutations generated so far (this is the <code>witheach</code> loop) and applies the central idea descried above (that is the inner <code>times</code> loop.)
|