Kotlin Discussions
1 Liners for List Comprehension-like operations?
bendb
August 9, 2016, 10:04pm
4
Also, just FYI ranges are super useful here:
(0..3).map { it + 1 } // or maybe just (1..4).toList()
show post in topic
Related topics
Topic
Replies
Views
Activity
Idiomatic Kotlin…
6
1397
February 4, 2015
List.fill or List.tabulate
Libraries
9
11825
March 14, 2017
Create array as [1, 2, 3] and maps as { a: 10 }
6
1025
July 25, 2021
Internal implementation of List operations
Language Design
1
696
February 16, 2021
Is there a simpler way to extend an array?
11
12722
April 8, 2013