Question: Apply permutation to a list

How would you apply a permutation to a list?

 

So, with permutation [[1,3],[2,4]], given in disjoint cycles,

how would you apply it to [1,2,3,4] to obtain [3,4,1,2]?

 

 

Thanks

Please Wait...