def any_of(pred, iterable):
    """
    Returns ``True`` if ``pred`` returns ``True`` for any of the elements in
    the ``iterable`` range, and ``False`` otherwise.

        >>> any_of(lambda x: x == 4, [1, 2, 3, 4])
        True

    :param pred: a predicate function to check a value from the iterable range
    :param iterable: an iterable range to check in
    :returns: ``True`` if ``pred`` returns ``True`` for any of the elements
    """
    return any((pred(i) for i in iterable))