While looking at examples of Kotlin code I cam across this:
fun main(args: Array<String>) { val myList = List(3) {it + 1} println(myList) } I understand what it does, but I didn't know a List could be constructed this way. When I reference the documentation (https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html) to see other possible ways to construct a List, I don't see any constructors at all. I can only assume I'm not looking in the right spot.
How do I go about properly reading documentation for Kotlin? Shouldn't everything pertaining to a List be contained in one place?