/**
 * This function modifies the elements of list1 based on the elements of list2 using the AND operator.
 *
 * @param list1 The original list.
 * @param list2 The list containing elements to be used for modifying list1.
 * @return The modified list1.
 */
fun modifyListElements(list1: List<Boolean>, list2: List<Boolean>): List<Boolean> {

    val modifiedList = list1.toMutableList()  // Create a copy of list1 to avoid modifying the original list

    for (i in modifiedList.indices) {
        // Apply the AND operator between list1[i] and list2[i]
        modifiedList[i] = modifiedList[i] && list2[i]
    }

    return modifiedList
}
/**
 * This function modifies the elements of list1 based on the elements of list2 using the AND operator.
 *
 * @param list1 The original list.
 * @param list2 The list containing elements to be used for modifying list1.
 * @return The modified list1.
 */
fun modifyListElements(list1: List<Boolean>, list2: List<Boolean>): List<Boolean> {
/**
 * This function modifies the elements of list1 based on the elements of list2 using the AND operator.
 *
 * @param list1 The original list.
 * @param list2 The list containing elements to be used for modifying list1.
 * @return The modified list1.
 */
fun modifyListElements(list1: List<Boolean>, list2: List<Boolean>): List<Boolean> {

    val modifiedList = list1.toMutableList()  // Create a copy of list1 to avoid modifying the original list

    for (i in modifiedList.indices) {
        // Apply the AND operator between list1[i] and list2[i]
        modifiedList[i] = modifiedList[i] && list2[i]
    }

    return modifiedList
}