def first_true(iterable, predicate=None, default=None):
    """
    Returns first value for which predicate(item) is true

    If no value is found, returns default.
    """
    return next(filter(predicate, iterable), default)