sameItem method
Compares the indexA
of the listA
with the indexB
of the listB
and returns
true is they are the same item. Usually, the "id" of the item is compared here.
Implementation
bool sameItem(T listA, int indexA, T listB, int indexB);