diff --git a/src/ii_collections/n22Fold.kt b/src/ii_collections/n22Fold.kt index 2fd2f2fcb..61d116878 100644 --- a/src/ii_collections/n22Fold.kt +++ b/src/ii_collections/n22Fold.kt @@ -12,8 +12,8 @@ fun whatFoldDoes(): Int { return result } -fun Shop.getSetOfProductsOrderedByEachCustomer(): Set { - // Return the set of products that were ordered by each of the customers +fun Shop.getSetOfProductsOrderedByEveryCustomer(): Set { + // Return the set of products that were ordered by every customer return customers.fold(allOrderedProducts, { orderedByAll, customer -> todoCollectionTask() }) diff --git a/test/ii_collections/N22FoldKtTest.kt b/test/ii_collections/N22FoldKtTest.kt index 1b0494761..b817a8d69 100644 --- a/test/ii_collections/N22FoldKtTest.kt +++ b/test/ii_collections/N22FoldKtTest.kt @@ -18,6 +18,6 @@ class N22FoldKtTest { order(youTrack) ) ) - assertEquals(setOf(idea), testShop.getSetOfProductsOrderedByEachCustomer()) + assertEquals(setOf(idea), testShop.getSetOfProductsOrderedByEveryCustomer()) } }