https://kotlinlang.org logo
#announcements
Title
# announcements
s

sargunv

06/13/2016, 8:43 PM
Copy code
data class Tree<V>(
        val value: V,
        val children: List<Tree<V>> = emptyList(),
        val parent: Tree<V>? = null
) {
    operator fun get(index: Int) = children[index]
}