def filter_clone(function, xs):
    """
    Elements from xs are filtered out only for which the output of function holds True.
    """
    filtered_lst = []  # We'll store our results here.

    for elem in xs:
        if function(elem):
            filtered_lst += [elem]

    return filtered_lst