Introduce Parameter: Implement "Introduce lambda parameter"
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
fun foo(a: Int, s: String, i: (Int) -> Int = { a -> a + 1 }): Int {
|
||||
val t = i(a) * 2
|
||||
return i(a) - t
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(1, "2")
|
||||
}
|
||||
Reference in New Issue
Block a user