def merge1(list1, list2):
    """
    Merge two sorted lists.

    Returns a new sorted list containing those elements that are in
    either list1 or list2.

    This function is recursive.
    """
    first_list = list(list1)
    second_list = list(list2)

    # appending the rest of the non-empty list
    if len(first_list) == 0:
        return second_list
    elif len(second_list) == 0:
        return first_list

    # merging the list recursively
    else:
        if first_list[0] < second_list[0]:
            rest_merged = merge1(first_list[1: ], second_list)
            return [first_list[0]] + rest_merged
        else:
            rest_merged = merge1(first_list, second_list[1: ])
            return [second_list[0]] + rest_merged