def pos_of(values, method):
    """Find the position of a value that is calculated by the given method.
    """
    result = method(values)
    pos = [i for i, j in enumerate(values) if j == result]
    if len(pos) > 1:
        print('Warning: The %s of the list is not distinct.' % (method,))
    return pos[0]