Function to be used with filter that checks that the current item is not equal to any previous item
the current value
the index of the current value
the array
Function to be used with filter that checks that the current item is not equal to any previous item