September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,5 +1,5 @@
|
|||
fun main(args: Array<String>) {
|
||||
val array = arrayOf(1,2,3,4,5,6,7,8,9,10) // build
|
||||
val array = arrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) // build
|
||||
val function = { i: Int -> i * i } // function to apply
|
||||
val list = array.map { function(it) } // process each item
|
||||
println(list) // print results
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue