# filter https://docs.python.org/3.10/library/functions.html#filter
def ft_filter(function, iterable):
    """filter(function or None, iterable) --> filter object

Return an iterator yielding those items of iterable for which function(item)
is true. If function is None, return the items that are true."""

    # iter
    # https://docs.python.org/3.10/library/functions.html?highlight=iter#iter
    if function is None:
        return iter([item for item in iterable if item])
    else:
        return iter([item for item in iterable if function(item)])
