/**
 * In this exercise, you need to create a function that takes two range values,
 * 'latitudeRange' and 'longitudeRange', and generates a list of all possible
 * coordinate combinations within those ranges.
 *
 * @param latitudeRange A range representing the latitude values.
 * @param longitudeRange A range representing the longitude values.
 * @return A list containing all possible coordinate combinations within the given ranges.
 *
 * Example:
 * createCoordinateList(1..2, 4..5) returns [(1, 4), (1, 5), (2, 4), (2, 5)]
 */
fun createCoordinateList(latitudeRange: IntRange, longitudeRange: IntRange): List<Pair<Int, Int>> {

    // Use nested list comprehension to generate all coordinate combinations
    val coordinates = latitudeRange.flatMap { lat -> longitudeRange.map { lon -> Pair(lat, lon) } }
    return coordinates
}
/**
 * In this exercise, you need to create a function that takes two range values,
 * 'latitudeRange' and 'longitudeRange', and generates a list of all possible
 * coordinate combinations within those ranges.
 *
 * @param latitudeRange A range representing the latitude values.
 * @param longitudeRange A range representing the longitude values.
 * @return A list containing all possible coordinate combinations within the given ranges.
 *
 * Example:
 * createCoordinateList(1..2, 4..5) returns [(1, 4), (1, 5), (2, 4), (2, 5)]
 */
fun createCoordinateList(latitudeRange: IntRange, longitudeRange: IntRange): List<Pair<Int, Int>> {
/**
 * In this exercise, you need to create a function that takes two range values,
 * 'latitudeRange' and 'longitudeRange', and generates a list of all possible
 * coordinate combinations within those ranges.
 *
 * @param latitudeRange A range representing the latitude values.
 * @param longitudeRange A range representing the longitude values.
 * @return A list containing all possible coordinate combinations within the given ranges.
 *
 * Example:
 * createCoordinateList(1..2, 4..5) returns [(1, 4), (1, 5), (2, 4), (2, 5)]
 */
fun createCoordinateList(latitudeRange: IntRange, longitudeRange: IntRange): List<Pair<Int, Int>> {

    // Use nested list comprehension to generate all coordinate combinations
    val coordinates = latitudeRange.flatMap { lat -> longitudeRange.map { lon -> Pair(lat, lon) } }
    return coordinates
}