How can I order a list to match the order of anoter list ?
For example if: Suppose I have the lists x = {3, 1, 5, 7}x = {3, 1, 5, 7}
and y = {3, 7, 1, 5} howy = {3, 7, 1, 5}
. How can I order xx
to have the order of y y
?
This question is interesting ifwhen each element of xx
has composite values, for example, as a list or an association.