Hi, I have a question regarding Kotlin Koans: Coll...
# getting-started
d
Hi, I have a question regarding Kotlin Koans: Collections: Max min - I'm trying this solution:
fun Customer.getMostExpensiveOrderedProduct(): Product? = orderedProducts.maxBy { it.price }
but it's failing and I'm not sure why. The test error is
Copy code
Expected: null
Actual: null
, so that's not really helpful to find out the problem
OK, so this might be related to the online editor @ https://try.kotlinlang.org The Customer.orderedProducts property is from the previous Koan, and although the code compiles, I'm guessing something is not entirely right there. When copying the same property to the current Koan, the test passes fine.