Skip to content

Commit b88171e

Browse files
committed
Fix wording for 'fold' description
1 parent 56efcf3 commit b88171e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ii_collections/n22Fold.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ fun whatFoldDoes(): Int {
1212
return result
1313
}
1414

15-
fun Shop.getSetOfProductsOrderedByEveryCustomer(): Set<Product> {
16-
// Return the set of products ordered by every customer
15+
fun Shop.getSetOfProductsOrderedByEachCustomer(): Set<Product> {
16+
// Return the set of products that were ordered by each of the customers
1717
return customers.fold(allOrderedProducts, {
1818
orderedByAll, customer ->
1919
todoCollectionTask()

test/ii_collections/N22FoldKtTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ class N22FoldKtTest {
1717
order(youTrack)
1818
)
1919
)
20-
assertEquals(setOf(idea), testShop.getSetOfProductsOrderedByEveryCustomer())
20+
assertEquals(setOf(idea), testShop.getSetOfProductsOrderedByEachCustomer())
2121
}
2222
}

0 commit comments

Comments
 (0)