import itertools


def find_combinations(values, length, function):
    """
    Builds all combinations of length length from the values.
    Filters the resultung list using the supllied function.
    """

    all_combinations = itertools.combinations(values, length)
    return list(filter(function, all_combinations))