Filtering when an infinite list begins to repeat
===

I am creating a sequence as a `[Integer]` in Haskell. The mathematical definition of the sequence is such that it repeats for some positive integers. In such a situation, I want to create to terminate the sequence and determine the length of the finite list.

My attempt at a solution is to create first an infinite list from the mathematical sequence. Then I want to filter the list for all elements until the first element repeats. The result should not include the repeating head of the list.

I have two questions/concerns here:

1) How do I match the head of the list to an element later in the list?
2) Is this an efficient method of solving my problem? (I will add more details about the exact sequence later if needed. For now I am looking for general comments.)