/**
 * Given a list of names and a case, modify each name in the list to the specified case.
 *
 * @param names A list of names.
 * @param case The desired case - "up" for uppercase, "low" for lowercase, "title" for title case.
 * @return The modified list of names.
 */
fun changeCase(names: List<String>, case: String): List<String> {

    return when (case) {
        "up" -> names.map { it.toUpperCase() }
        "low" -> names.map { it.toLowerCase() }
        "title" -> names.map { it.capitalize() }
        else -> names
    }
}
/**
 * Given a list of names and a case, modify each name in the list to the specified case.
 *
 * @param names A list of names.
 * @param case The desired case - "up" for uppercase, "low" for lowercase, "title" for title case.
 * @return The modified list of names.
 */
fun changeCase(names: List<String>, case: String): List<String> {
/**
 * Given a list of names and a case, modify each name in the list to the specified case.
 *
 * @param names A list of names.
 * @param case The desired case - "up" for uppercase, "low" for lowercase, "title" for title case.
 * @return The modified list of names.
 */
fun changeCase(names: List<String>, case: String): List<String> {

    return when (case) {
        "up" -> names.map { it.toUpperCase() }
        "low" -> names.map { it.toLowerCase() }
        "title" -> names.map { it.capitalize() }
        else -> names
    }
}