/**
 * This exercise requires you to concatenate the first name and last name of a list of lawyers, using string interpolation.
 *
 * @param names A list of lawyers' names, where each name is a pair with a first name and a last name.
 * @return A string containing the concatenated full names of the lawyers, separated by a comma.
 *
 * Example:
 * concatenateNames(listOf("John" to "Doe", "Jane" to "Smith", "David" to "Johnson")) 
 * // Returns: "John Doe, Jane Smith, David Johnson"
 */
fun concatenateNames(names: List<Pair<String, String>>): String {

    val fullNames = names.map { "${it.first} ${it.second}" }
    return fullNames.joinToString(", ")
}
/**
 * This exercise requires you to concatenate the first name and last name of a list of lawyers, using string interpolation.
 *
 * @param names A list of lawyers' names, where each name is a pair with a first name and a last name.
 * @return A string containing the concatenated full names of the lawyers, separated by a comma.
 *
 * Example:
 * concatenateNames(listOf("John" to "Doe", "Jane" to "Smith", "David" to "Johnson")) 
 * // Returns: "John Doe, Jane Smith, David Johnson"
 */
fun concatenateNames(names: List<Pair<String, String>>): String {
/**
 * This exercise requires you to concatenate the first name and last name of a list of lawyers, using string interpolation.
 *
 * @param names A list of lawyers' names, where each name is a pair with a first name and a last name.
 * @return A string containing the concatenated full names of the lawyers, separated by a comma.
 *
 * Example:
 * concatenateNames(listOf("John" to "Doe", "Jane" to "Smith", "David" to "Johnson")) 
 * // Returns: "John Doe, Jane Smith, David Johnson"
 */
fun concatenateNames(names: List<Pair<String, String>>): String {

    val fullNames = names.map { "${it.first} ${it.second}" }
    return fullNames.joinToString(", ")
}