/**
 * Given a tuple 't`, an index 'index`, and a value 'value`, modify the tuple 't" by replacing the element at the specified index with the given value.
 *
 * @param t The original tuple.
 * @param index The index of the element to be replaced.
 * @param value The new value to be assigned.
 * @return The modified tuple.
 */
fun modifyTuple(t: List<Any>, index: Int, value: Any): List<Any> {

    // Convert the tuple to a mutable list
    val tList = t.toMutableList()

    // Replace the element at the specified index with the given value
    tList[index] = value

    return tList
}
/**
 * Given a tuple 't`, an index 'index`, and a value 'value`, modify the tuple 't" by replacing the element at the specified index with the given value.
 *
 * @param t The original tuple.
 * @param index The index of the element to be replaced.
 * @param value The new value to be assigned.
 * @return The modified tuple.
 */
fun modifyTuple(t: List<Any>, index: Int, value: Any): List<Any> {
/**
 * Given a tuple 't`, an index 'index`, and a value 'value`, modify the tuple 't" by replacing the element at the specified index with the given value.
 *
 * @param t The original tuple.
 * @param index The index of the element to be replaced.
 * @param value The new value to be assigned.
 * @return The modified tuple.
 */
fun modifyTuple(t: List<Any>, index: Int, value: Any): List<Any> {

    // Convert the tuple to a mutable list
    val tList = t.toMutableList()

    // Replace the element at the specified index with the given value
    tList[index] = value

    return tList
}