diff --git a/src/ii_collections/n15AllAnyAndOtherPredicates.kt b/src/ii_collections/n15AllAnyAndOtherPredicates.kt index 788d64bfa..15b417317 100644 --- a/src/ii_collections/n15AllAnyAndOtherPredicates.kt +++ b/src/ii_collections/n15AllAnyAndOtherPredicates.kt @@ -33,7 +33,7 @@ fun Shop.countCustomersFrom(city: City): Int { todoCollectionTask() } -fun Shop.findAnyCustomerFrom(city: City): Customer? { - // Return a customer who lives in the given city, or null if there is none +fun Shop.findFirstCustomerFrom(city: City): Customer? { + // Return the first customer who lives in the given city, or null if there is none todoCollectionTask() } diff --git a/test/ii_collections/N15AllAnyAndOtherPredicatesKtTest.kt b/test/ii_collections/N15AllAnyAndOtherPredicatesKtTest.kt index 440ca5acb..66762b54c 100644 --- a/test/ii_collections/N15AllAnyAndOtherPredicatesKtTest.kt +++ b/test/ii_collections/N15AllAnyAndOtherPredicatesKtTest.kt @@ -22,8 +22,8 @@ class N15AllAnyAndOtherPredicatesKtTest { assertEquals(2, shop.countCustomersFrom(Canberra)) } - @Test fun testAnyCustomerFromCity() { - assertEquals(customers[lucas], shop.findAnyCustomerFrom(Canberra)) - assertEquals(null, shop.findAnyCustomerFrom(City("Chicago"))) + @Test fun testFirstCustomerFromCity() { + assertEquals(customers[lucas], shop.findFirstCustomerFrom(Canberra)) + assertEquals(null, shop.findFirstCustomerFrom(City("Chicago"))) } }