/**
 * The function takes a tuple of items and a list of indices as input.
 * It returns a new tuple containing the items in the order specified by the list indices.
 *
 * @param items The original tuple of items.
 * @param order A list of indices specifying the order of items to be extracted from the tuple.
 * @return A new tuple containing the items in the order specified by the list.
 *
 * Example:
 * getOrderedItems(listOf("dress", "shirt", "pants", "hat"), listOf(3, 1))
 * Output: listOf("hat", "shirt")
 */
fun getOrderedItems(items: List<String>, order: List<Int>): List<String> {

    return order.map { items[it] }
}
/**
 * The function takes a tuple of items and a list of indices as input.
 * It returns a new tuple containing the items in the order specified by the list indices.
 *
 * @param items The original tuple of items.
 * @param order A list of indices specifying the order of items to be extracted from the tuple.
 * @return A new tuple containing the items in the order specified by the list.
 *
 * Example:
 * getOrderedItems(listOf("dress", "shirt", "pants", "hat"), listOf(3, 1))
 * Output: listOf("hat", "shirt")
 */
fun getOrderedItems(items: List<String>, order: List<Int>): List<String> {
/**
 * The function takes a tuple of items and a list of indices as input.
 * It returns a new tuple containing the items in the order specified by the list indices.
 *
 * @param items The original tuple of items.
 * @param order A list of indices specifying the order of items to be extracted from the tuple.
 * @return A new tuple containing the items in the order specified by the list.
 *
 * Example:
 * getOrderedItems(listOf("dress", "shirt", "pants", "hat"), listOf(3, 1))
 * Output: listOf("hat", "shirt")
 */
fun getOrderedItems(items: List<String>, order: List<Int>): List<String> {

    return order.map { items[it] }
}