Finds the smallest value using a comparator.
the list of values to compare
compares the values
the smallest value
thrown if values is empty
values
Finds the smallest value using a comparator.