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