/**
 * This function takes a start and stop parameter to create a range, and then indexes the resulting range tuple.
 *
 * @param start The start value for the range, inclusive.
 * @param stop The stop value for the range, exclusive.
 * @param step The step value for the range.
 * @return A tuple containing the range and the indexed value at the intersection.
 *
 * Example:
 * indexAndCreateRange(1, 10, 2) -> Pair(listOf(1, 3, 5, 7, 9), 5)
 */
fun indexAndCreateRange(start: Int, stop: Int, step: Int): Pair<List<Int>, Int> {

    // Creating a range with start and stop parameters
    val myRange = (start until stop step step).toList()

    // Indexing the resulting range list
    val indexedValue = myRange[2]

    return Pair(myRange, indexedValue)
}
/**
 * This function takes a start and stop parameter to create a range, and then indexes the resulting range tuple.
 *
 * @param start The start value for the range, inclusive.
 * @param stop The stop value for the range, exclusive.
 * @param step The step value for the range.
 * @return A tuple containing the range and the indexed value at the intersection.
 *
 * Example:
 * indexAndCreateRange(1, 10, 2) -> Pair(listOf(1, 3, 5, 7, 9), 5)
 */
fun indexAndCreateRange(start: Int, stop: Int, step: Int): Pair<List<Int>, Int> {
/**
 * This function takes a start and stop parameter to create a range, and then indexes the resulting range tuple.
 *
 * @param start The start value for the range, inclusive.
 * @param stop The stop value for the range, exclusive.
 * @param step The step value for the range.
 * @return A tuple containing the range and the indexed value at the intersection.
 *
 * Example:
 * indexAndCreateRange(1, 10, 2) -> Pair(listOf(1, 3, 5, 7, 9), 5)
 */
fun indexAndCreateRange(start: Int, stop: Int, step: Int): Pair<List<Int>, Int> {

    // Creating a range with start and stop parameters
    val myRange = (start until stop step step).toList()

    // Indexing the resulting range list
    val indexedValue = myRange[2]

    return Pair(myRange, indexedValue)
}