Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
14
Task/Nested-function/Kotlin/nested-function.kts
Normal file
14
Task/Nested-function/Kotlin/nested-function.kts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// version 1.0.6
|
||||
|
||||
fun makeList(sep: String): String {
|
||||
var count = 0
|
||||
fun makeItem(item: String): String {
|
||||
count++
|
||||
return "$count$sep$item\n"
|
||||
}
|
||||
return makeItem("first") + makeItem("second") + makeItem("third")
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
print(makeList(". "))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue