Moved permutation function to Sequence.hs.