Intention to convert anonymous function to lambda
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
fun foo(f: () -> Int) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun main(args: String) {
|
||||
foo { 1 }
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun foo(f: () -> Int) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun main(args: String) {
|
||||
foo(fun(): Int {
|
||||
return 1
|
||||
})
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
Converts an anonymous function in call to lambda expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user