/**
 * This function takes a list of pairs representing the library and a string representing
 * the name of a book, and checks if the book is borrowed or not.
 */
fun checkBorrowedBooks(library: List<Pair<String, Boolean>>, bookName: String): Boolean {

    for (book in library) {
        if (book.first == bookName) {
            return book.second
        }
    }
    return false
}

// Example usage
/**
 * This function takes a list of pairs representing the library and a string representing
 * the name of a book, and checks if the book is borrowed or not.
 */
fun checkBorrowedBooks(library: List<Pair<String, Boolean>>, bookName: String): Boolean {
/**
 * This function takes a list of pairs representing the library and a string representing
 * the name of a book, and checks if the book is borrowed or not.
 */
fun checkBorrowedBooks(library: List<Pair<String, Boolean>>, bookName: String): Boolean {

    for (book in library) {
        if (book.first == bookName) {
            return book.second
        }
    }
    return false
}

// Example usage