/**
 * A librarian needs to find all the available books in the library's catalog.
 * The library catalog is a list of dictionaries, where each dictionary represents a book,
 * with keys 'Title', 'Author', and 'Available'.
 * The librarian wants to iterate over the catalog using a for loop and filter the available books only.
 * The function should return a new list containing only the available books.
 *
 * @param libraryCatalog A list of dictionaries representing the library catalog.
 * @return A list of dictionaries representing the available books in the catalog.
 */
fun findAvailableBooks(libraryCatalog: List<Map<String, Any>>): List<Map<String, Any>> {

    // Initialize an empty list to store the available books
    val availableBooks = mutableListOf<Map<String, Any>>()

    // Iterate over each book in the library catalog
    for (book in libraryCatalog) {
        // Check if the book is available
        if (book["Available"] as Boolean) {
            // Add the book to the list of available books
            availableBooks.add(book)
        }
    }

    return availableBooks
}
/**
 * A librarian needs to find all the available books in the library's catalog.
 * The library catalog is a list of dictionaries, where each dictionary represents a book,
 * with keys 'Title', 'Author', and 'Available'.
 * The librarian wants to iterate over the catalog using a for loop and filter the available books only.
 * The function should return a new list containing only the available books.
 *
 * @param libraryCatalog A list of dictionaries representing the library catalog.
 * @return A list of dictionaries representing the available books in the catalog.
 */
fun findAvailableBooks(libraryCatalog: List<Map<String, Any>>): List<Map<String, Any>> {
/**
 * A librarian needs to find all the available books in the library's catalog.
 * The library catalog is a list of dictionaries, where each dictionary represents a book,
 * with keys 'Title', 'Author', and 'Available'.
 * The librarian wants to iterate over the catalog using a for loop and filter the available books only.
 * The function should return a new list containing only the available books.
 *
 * @param libraryCatalog A list of dictionaries representing the library catalog.
 * @return A list of dictionaries representing the available books in the catalog.
 */
fun findAvailableBooks(libraryCatalog: List<Map<String, Any>>): List<Map<String, Any>> {

    // Initialize an empty list to store the available books
    val availableBooks = mutableListOf<Map<String, Any>>()

    // Iterate over each book in the library catalog
    for (book in libraryCatalog) {
        // Check if the book is available
        if (book["Available"] as Boolean) {
            // Add the book to the list of available books
            availableBooks.add(book)
        }
    }

    return availableBooks
}