请问怎么调用这个高阶函数?
class Score(val classId: String, val subjectId: String, val score: Double)
fun processScore(scores: List<Score>, rule: (Score) -> Boolean): Map<String, Double> {
return scores.filter(rule).groupBy({it.classId}, {it.score}).mapValues{it.value.average()}
}
fun main(){
// val list = list.pinkNum{it % 4 == 0}
// println(list)
// val list = list.filterMap({it % 2 == 0}, {it * 2})
// println(list)
val s = Score("001", "002", 100.0)
val list = s.processScore()
}