/**
 * This function takes two input lists:
 * - artistKeywords: a list of keywords associated with an artist
 * - newKeywords: a list containing new keywords to be appended to the artist's keywords
 *
 * The function appends the new keywords to the artist's existing keywords list using the AND operator.
 * It then returns the updated list of keywords.
 *
 * For example:
 * artistKeywords = ['painter', 'sculptor', 'abstract']
 * newKeywords = ['modern', 'expressionist']
 *
 * The function should return:
 * ['painter', 'sculptor', 'abstract', 'modern', 'expressionist']
 */
fun appendElements(artistKeywords: List<String>, newKeywords: List<String>): List<String> {

    // Append newKeywords to artistKeywords using the AND operator
    val updatedKeywords = artistKeywords + newKeywords.filter { keyword -> keyword !in artistKeywords }

    return updatedKeywords
}
/**
 * This function takes two input lists:
 * - artistKeywords: a list of keywords associated with an artist
 * - newKeywords: a list containing new keywords to be appended to the artist's keywords
 *
 * The function appends the new keywords to the artist's existing keywords list using the AND operator.
 * It then returns the updated list of keywords.
 *
 * For example:
 * artistKeywords = ['painter', 'sculptor', 'abstract']
 * newKeywords = ['modern', 'expressionist']
 *
 * The function should return:
 * ['painter', 'sculptor', 'abstract', 'modern', 'expressionist']
 */
fun appendElements(artistKeywords: List<String>, newKeywords: List<String>): List<String> {
/**
 * This function takes two input lists:
 * - artistKeywords: a list of keywords associated with an artist
 * - newKeywords: a list containing new keywords to be appended to the artist's keywords
 *
 * The function appends the new keywords to the artist's existing keywords list using the AND operator.
 * It then returns the updated list of keywords.
 *
 * For example:
 * artistKeywords = ['painter', 'sculptor', 'abstract']
 * newKeywords = ['modern', 'expressionist']
 *
 * The function should return:
 * ['painter', 'sculptor', 'abstract', 'modern', 'expressionist']
 */
fun appendElements(artistKeywords: List<String>, newKeywords: List<String>): List<String> {

    // Append newKeywords to artistKeywords using the AND operator
    val updatedKeywords = artistKeywords + newKeywords.filter { keyword -> keyword !in artistKeywords }

    return updatedKeywords
}