@SentientPizza
as it is in a collection you can organize the loop over the indexes.
Lets assume you have a list with 10 elements
use a for each
type argument is Int32
for the iteration pass Enumerable.Range(1, (YourList.Count - 1)).toList - it is creating a sequence starting by 1,2,3,4…
we keep the name of loop var - item
in the loop block the compare can be done with
if: YourList.ElementAt(item-1) = YourList.ElementAt(item)