Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
// version 1.0.6
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// create an array of 10 anonymous functions which return the square of their index
|
||||
val funcs = Array(10){ fun(): Int = it * it }
|
||||
// call all but the last
|
||||
(0 .. 8).forEach { println(funcs[it]()) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue