def cons(a, b):
    """
    Construct a pair.
    :param a: first element
    :param b: second element
    :return: a function that takes a function and activates it on the pair
    """
    def pair(f):
        return f(a, b)
    return pair