camLine interview question

How can you loop through a list?