Kotlin Lambda
always in curly braces{x: Int, y: Int -> x + y}if a lambda is the last argument in a function call, it can be placed after the parentheseslist.maxByOrNull ({ it: Person -> it.age })list.maxByOrNull () { it: Person -> it.age }if the lambda is.
原创
2021-04-06 15:39:24 ·
217 阅读 ·
0 评论