def keep_ints_compose(n):
    """Returns a function which takes one parameter cond and prints out
    all integers 1..i..n where calling cond(i) returns True.
    >>> def is_even(x):
    ...     # Even numbers have remainder 0 when divided by 2.
    ...     return x % 2 == 0
    >>> keep_ints_compose(5)(is_even)
    2
    4
    """
    """BEGIN PROBLEM 2.3"""
    lst = [i for i in range(1, n + 1)]
    # I could have used a lambda expression, but since it returns anything it evaluates, it would fail the test cases
    def process(cond):
        [print(i) for i in lst if cond(i)]
    return process
    """END PROBLEM 2.3"""