Skip to content

Commit

Permalink
Made 2.16 pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthorne committed Jul 22, 2018
1 parent 3047d6e commit f3d6239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ii_collections/n16FlatMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ fun example() {

val Customer.orderedProducts: Set<Product> get() {
// Return all products this customer has ordered
todoCollectionTask()
return this.orders.flatMap { it.products }.toSet()
}

val Shop.allOrderedProducts: Set<Product> get() {
// Return all products that were ordered by at least one customer
todoCollectionTask()
return this.customers.flatMap { it.orders.flatMap { it.products } }.toSet()
}

0 comments on commit f3d6239

Please sign in to comment.