```fun Shop.getSetOfProductsOrderedByEveryCustomer...
# thailand
n
Copy code
fun Shop.getSetOfProductsOrderedByEveryCustomer(): Set<Product> {
    // Return the set of products ordered by every customer
    return customers.fold(allOrderedProducts, {
        orderedByAll, customer ->
        val customerProducts = customer.orders.flatMap { it.products }
        orderedByAll.intersect(customerProducts)
    })
}