in reply to Comparing adjacent lines
Think about how you might do this in real life. Imagine picking something up with one hand, you take a good look at it, put it into your other hand and pick up the next object, take a good look at it and compare the two objects. Then you drop the oldest object, move the remaining object to the other hand and pick up a new object to compare... and so on. Basically, you need two hands.