/**
 * Create a range based on the start and stop parameters.
 *
 * @param start The starting value of the range.
 * @param stop The ending value of the range.
 * @return A list representing the range from start to stop.
 *
 * Exercise:
 * Modify the implementation of this function to return a custom range based on the start and stop parameters.
 * - If start is less than stop, return a range with positive increment from start to stop (inclusive).
 * - If start is greater than stop, return a range with negative increment from start to stop (exclusive).
 * - If start and stop are equal, return an empty list.
 * - If start and stop are both 0, return a list containing only the number 0.
 *
 * Example:
 * createRange(2, 6) -> [2, 3, 4, 5, 6]
 * createRange(6, 2) -> [6, 5, 4, 3]
 * createRange(0, 0) -> [0]
 * createRange(10, 10) -> []
 */
fun createRange(start: Int, stop: Int): List<Int> {

    return if (start < stop) {
        (start..stop).toList()
    } else if (start > stop) {
        (start downTo stop + 1).toList()
    } else {
        emptyList()
    }
}
/**
 * Create a range based on the start and stop parameters.
 *
 * @param start The starting value of the range.
 * @param stop The ending value of the range.
 * @return A list representing the range from start to stop.
 *
 * Exercise:
 * Modify the implementation of this function to return a custom range based on the start and stop parameters.
 * - If start is less than stop, return a range with positive increment from start to stop (inclusive).
 * - If start is greater than stop, return a range with negative increment from start to stop (exclusive).
 * - If start and stop are equal, return an empty list.
 * - If start and stop are both 0, return a list containing only the number 0.
 *
 * Example:
 * createRange(2, 6) -> [2, 3, 4, 5, 6]
 * createRange(6, 2) -> [6, 5, 4, 3]
 * createRange(0, 0) -> [0]
 * createRange(10, 10) -> []
 */
fun createRange(start: Int, stop: Int): List<Int> {
/**
 * Create a range based on the start and stop parameters.
 *
 * @param start The starting value of the range.
 * @param stop The ending value of the range.
 * @return A list representing the range from start to stop.
 *
 * Exercise:
 * Modify the implementation of this function to return a custom range based on the start and stop parameters.
 * - If start is less than stop, return a range with positive increment from start to stop (inclusive).
 * - If start is greater than stop, return a range with negative increment from start to stop (exclusive).
 * - If start and stop are equal, return an empty list.
 * - If start and stop are both 0, return a list containing only the number 0.
 *
 * Example:
 * createRange(2, 6) -> [2, 3, 4, 5, 6]
 * createRange(6, 2) -> [6, 5, 4, 3]
 * createRange(0, 0) -> [0]
 * createRange(10, 10) -> []
 */
fun createRange(start: Int, stop: Int): List<Int> {

    return if (start < stop) {
        (start..stop).toList()
    } else if (start > stop) {
        (start downTo stop + 1).toList()
    } else {
        emptyList()
    }
}