Hello, OMians!
I wonder whether there is a simple and efficient way to perform the following test: in a list of lists of numbers, in each list I would like to test that a larger number does not appear before a lower one (the first time only). For example: (1 2 3 2 1) is ok, but (1 3 2 1 2) not, because 3 appears before 2 appears the first time. Other examples of not good lists are: (2 1 3 1 2 3 2), first 2 before 1, (1 2 4 3 2 5 1), 4 before 3, (1 2 1 1 3 1 5 1 1 4 2), 5 before 4.
What I managed to write looks terribly complicated to me, but, perhaps, there is no easy solution to this.
Thank you very much in advance.
Marco