/**
 * This exercise requires the completion of a function that takes an adjective, a list of fashion items,
 * and an index range. It should return a string that concatenates the given adjective with items sliced
 * from the list based on the provided index range. Make sure to solve the exercise using string concatenation
 * and list slicing only.
 *
 * @param adjective A string representing an adjective to describe the fashion items.
 * @param items A list of strings representing various fashion items.
 * @param indexRange A pair of integers representing the start and end indices for slicing the items list.
 * @return A string resulting from concatenating the adjective with the sliced fashion items.
 *
 * Example:
 * createFashionSentence("amazing", listOf("dress", "jacket", "shoes", "hat", "watch"), Pair(1, 4))
 * Output: "amazing jacket shoes hat"
 */
fun createFashionSentence(adjective: String, items: List<String>, indexRange: Pair<Int, Int>): String {

    return "$adjective ${items.subList(indexRange.first, indexRange.second).joinToString(" ")}"
}
/**
 * This exercise requires the completion of a function that takes an adjective, a list of fashion items,
 * and an index range. It should return a string that concatenates the given adjective with items sliced
 * from the list based on the provided index range. Make sure to solve the exercise using string concatenation
 * and list slicing only.
 *
 * @param adjective A string representing an adjective to describe the fashion items.
 * @param items A list of strings representing various fashion items.
 * @param indexRange A pair of integers representing the start and end indices for slicing the items list.
 * @return A string resulting from concatenating the adjective with the sliced fashion items.
 *
 * Example:
 * createFashionSentence("amazing", listOf("dress", "jacket", "shoes", "hat", "watch"), Pair(1, 4))
 * Output: "amazing jacket shoes hat"
 */
fun createFashionSentence(adjective: String, items: List<String>, indexRange: Pair<Int, Int>): String {
/**
 * This exercise requires the completion of a function that takes an adjective, a list of fashion items,
 * and an index range. It should return a string that concatenates the given adjective with items sliced
 * from the list based on the provided index range. Make sure to solve the exercise using string concatenation
 * and list slicing only.
 *
 * @param adjective A string representing an adjective to describe the fashion items.
 * @param items A list of strings representing various fashion items.
 * @param indexRange A pair of integers representing the start and end indices for slicing the items list.
 * @return A string resulting from concatenating the adjective with the sliced fashion items.
 *
 * Example:
 * createFashionSentence("amazing", listOf("dress", "jacket", "shoes", "hat", "watch"), Pair(1, 4))
 * Output: "amazing jacket shoes hat"
 */
fun createFashionSentence(adjective: String, items: List<String>, indexRange: Pair<Int, Int>): String {

    return "$adjective ${items.subList(indexRange.first, indexRange.second).joinToString(" ")}"
}