Anonymous user
Permutations: Difference between revisions
→Single yield iterator
Line 6,196:
let j = if (i and 1) == 0: 0 else: int(c[i])
swap(xs[i], xs[j])
</lang>
verification
<lang nim>
import intsets
from math import fac
|