Cyclically sort lists of mixed element types?
Here is a function
cyc[list_] := RotateLeft[list, First@Ordering[list, 1]]
For your lists:
list1 = {1, 2, a[1], 8, b[4], 9};
list2 = {8, b[4], 9, 1, 2, a[1]};
cyc[list1] == cyc[list2]
True
Here is a function
cyc[list_] := RotateLeft[list, First@Ordering[list, 1]]
For your lists:
list1 = {1, 2, a[1], 8, b[4], 9};
list2 = {8, b[4], 9, 1, 2, a[1]};
cyc[list1] == cyc[list2]
True