/**
 * This function checks the borrowings between a library and a user.
 * It iterates over the borrowed books in the library and prints a message
 * if a book borrowed by the given user is found.
 *
 * @param library A list containing dictionaries representing the borrowed books in the library.
 * @param user The name of the user whose borrowings need to be checked.
 */
fun checkBorrowings(library: List<Map<String, String>>, user: String) {

    for (borrowedBook in library) {
        if (borrowedBook["user"] == user) {
            println("$user has borrowed '${borrowedBook["title"]}'")
        }
    }
}
/**
 * This function checks the borrowings between a library and a user.
 * It iterates over the borrowed books in the library and prints a message
 * if a book borrowed by the given user is found.
 *
 * @param library A list containing dictionaries representing the borrowed books in the library.
 * @param user The name of the user whose borrowings need to be checked.
 */
fun checkBorrowings(library: List<Map<String, String>>, user: String) {
/**
 * This function checks the borrowings between a library and a user.
 * It iterates over the borrowed books in the library and prints a message
 * if a book borrowed by the given user is found.
 *
 * @param library A list containing dictionaries representing the borrowed books in the library.
 * @param user The name of the user whose borrowings need to be checked.
 */
fun checkBorrowings(library: List<Map<String, String>>, user: String) {

    for (borrowedBook in library) {
        if (borrowedBook["user"] == user) {
            println("$user has borrowed '${borrowedBook["title"]}'")
        }
    }
}