/**
 * This exercise tests your understanding of conversion between sets and other data structures, as well as indexing and slicing tuples.
 *
 * You are given a tuple of geospatial coordinates in the format (latitude, longitude). Your task is to convert this tuple into a set and return the coordinates in reverse order. Additionally, you need to slice the tuple to return only the latitude part.
 *
 * @param data A tuple of geospatial coordinates in the format (latitude, longitude)
 * @return A set containing the reversed geospatial coordinates and the latitude part of the geospatial coordinates
 *
 * Example:
 * - input: convertToSet(40.7128, -74.006)
 * - output: Pair(setOf(-74.006, 40.7128), 40.7128)
 */
fun convertToSet(latitude: Double, longitude: Double): Pair<Set<Double>, Double> {

    // Convert the tuple to a set and reverse the order
    val coordinatesSet = setOf(longitude, latitude)

    // Extract the latitude part from the tuple
    val extractedLatitude = latitude

    return Pair(coordinatesSet, extractedLatitude)
}
/**
 * This exercise tests your understanding of conversion between sets and other data structures, as well as indexing and slicing tuples.
 *
 * You are given a tuple of geospatial coordinates in the format (latitude, longitude). Your task is to convert this tuple into a set and return the coordinates in reverse order. Additionally, you need to slice the tuple to return only the latitude part.
 *
 * @param data A tuple of geospatial coordinates in the format (latitude, longitude)
 * @return A set containing the reversed geospatial coordinates and the latitude part of the geospatial coordinates
 *
 * Example:
 * - input: convertToSet(40.7128, -74.006)
 * - output: Pair(setOf(-74.006, 40.7128), 40.7128)
 */
fun convertToSet(latitude: Double, longitude: Double): Pair<Set<Double>, Double> {
/**
 * This exercise tests your understanding of conversion between sets and other data structures, as well as indexing and slicing tuples.
 *
 * You are given a tuple of geospatial coordinates in the format (latitude, longitude). Your task is to convert this tuple into a set and return the coordinates in reverse order. Additionally, you need to slice the tuple to return only the latitude part.
 *
 * @param data A tuple of geospatial coordinates in the format (latitude, longitude)
 * @return A set containing the reversed geospatial coordinates and the latitude part of the geospatial coordinates
 *
 * Example:
 * - input: convertToSet(40.7128, -74.006)
 * - output: Pair(setOf(-74.006, 40.7128), 40.7128)
 */
fun convertToSet(latitude: Double, longitude: Double): Pair<Set<Double>, Double> {

    // Convert the tuple to a set and reverse the order
    val coordinatesSet = setOf(longitude, latitude)

    // Extract the latitude part from the tuple
    val extractedLatitude = latitude

    return Pair(coordinatesSet, extractedLatitude)
}