Functions for finding the duplicates in a list.