函数应发送找到的客户名下的每个订单。请找出接收对象错误。
kotlin
data class Customer(val id: String)
data class Order(val customerId: String)
fun notify(customer: Customer?, orders: List<Order>) {
customer?.let {
orders.filter { it.customerId == it.id }
.forEach { order -> send(order) }
}
}