/**
 * Access elements of a tuple using negative indices.
 *
 * @param negativeRange The range object containing negative values.
 * @param tupleData The tuple to access elements from.
 * @return A list of accessed tuple elements.
 * @throws IndexOutOfBoundsException If an index does not exist in the tuple.
 */
fun accessTupleElements(negativeRange: IntRange, tupleData: List<Any>): List<Any> {

    val accessedElements = mutableListOf<Any>()
    for (i in negativeRange) {
        accessedElements.add(tupleData.getOrNull(i) ?: throw IndexOutOfBoundsException("Index $i out of bounds"))
    }
    return accessedElements
}
/**
 * Access elements of a tuple using negative indices.
 *
 * @param negativeRange The range object containing negative values.
 * @param tupleData The tuple to access elements from.
 * @return A list of accessed tuple elements.
 * @throws IndexOutOfBoundsException If an index does not exist in the tuple.
 */
fun accessTupleElements(negativeRange: IntRange, tupleData: List<Any>): List<Any> {
/**
 * Access elements of a tuple using negative indices.
 *
 * @param negativeRange The range object containing negative values.
 * @param tupleData The tuple to access elements from.
 * @return A list of accessed tuple elements.
 * @throws IndexOutOfBoundsException If an index does not exist in the tuple.
 */
fun accessTupleElements(negativeRange: IntRange, tupleData: List<Any>): List<Any> {

    val accessedElements = mutableListOf<Any>()
    for (i in negativeRange) {
        accessedElements.add(tupleData.getOrNull(i) ?: throw IndexOutOfBoundsException("Index $i out of bounds"))
    }
    return accessedElements
}