Introduce Lambda Parameter: Support extraction of string template fragments

This commit is contained in:
Alexey Sedunov
2015-11-20 14:23:41 +03:00
parent c82d431cff
commit 736813c76a
34 changed files with 277 additions and 1 deletions
@@ -0,0 +1,6 @@
fun foo(a: Int, i: (Int) -> Int = { a -> a + 1 }): String {
val x = "-${i(a)}"
val y = "x${i(a)}y"
val z = "x${a - 1}y"
return "abc${i(a)}def"
}