map a function over a glob pattern, relative to a directory

def map_over_glob(fn, path, pattern):
    """map a function over a glob pattern, relative to a directory"""
    return [fn(x) for x in glob.glob(os.path.join(path, pattern))]