def transform_list(old_list, transformer):
    """Returns a new list with each item transformed by transformer."""
    new_list = []
    for item in old_list:
        new_list.append(transformer(item))
    return new_list