def map_and_filter(s, map_fn, filter_fn):
    """Returns a new list containing the results of calling map_fn on each
    element of sequence s for which filter_fn returns a true value.
    """
    return [map_fn(i) for i in s if filter_fn(i)]