http://qs321.pair.com?node_id=519832


in reply to Re^2: Derangements iterator
in thread Derangements iterator

You misunderstood what was being deranged. What you list as the original is not the original, but merely the (unordered) set. Shuffling provides the "original" order, and rotation provides the derangement of that order.

Caution: Contents may have been coded under pressure.