/**
 * This exercise requires the carpenter to append new tools and materials to their existing lists.
 * It is a difficult exercise as it tests the understanding of lists and tuples in Kotlin.
 *
 * @param carpenter The name of the carpenter.
 * @param tools The existing list of tools.
 * @param materials The existing tuple of materials.
 * @return Pair<List<String>, List<String>> The updated list of tools and materials after appending new ones.
 */
fun appendNewElements(carpenter: String, tools: MutableList<String>, materials: List<String>): Pair<List<String>, List<String>> {

    // Append new tools to the list
    tools.add("Circular saw")
    tools.add("Chisel")

    // Convert the list to a mutable list to append elements
    val updatedMaterials = materials.toMutableList()

    // Append new materials to the list
    updatedMaterials.add("Plywood")
    updatedMaterials.add("Nails")

    return Pair(tools, updatedMaterials)
}

// Example usage:
val existingTools = mutableListOf("Hammer", "Saw")
val existingMaterials = listOf("Wood", "Sandpaper")
/**
 * This exercise requires the carpenter to append new tools and materials to their existing lists.
 * It is a difficult exercise as it tests the understanding of lists and tuples in Kotlin.
 *
 * @param carpenter The name of the carpenter.
 * @param tools The existing list of tools.
 * @param materials The existing tuple of materials.
 * @return Pair<List<String>, List<String>> The updated list of tools and materials after appending new ones.
 */
fun appendNewElements(carpenter: String, tools: MutableList<String>, materials: List<String>): Pair<List<String>, List<String>> {
/**
 * This exercise requires the carpenter to append new tools and materials to their existing lists.
 * It is a difficult exercise as it tests the understanding of lists and tuples in Kotlin.
 *
 * @param carpenter The name of the carpenter.
 * @param tools The existing list of tools.
 * @param materials The existing tuple of materials.
 * @return Pair<List<String>, List<String>> The updated list of tools and materials after appending new ones.
 */
fun appendNewElements(carpenter: String, tools: MutableList<String>, materials: List<String>): Pair<List<String>, List<String>> {

    // Append new tools to the list
    tools.add("Circular saw")
    tools.add("Chisel")

    // Convert the list to a mutable list to append elements
    val updatedMaterials = materials.toMutableList()

    // Append new materials to the list
    updatedMaterials.add("Plywood")
    updatedMaterials.add("Nails")

    return Pair(tools, updatedMaterials)
}

// Example usage:
val existingTools = mutableListOf("Hammer", "Saw")
val existingMaterials = listOf("Wood", "Sandpaper")