I now have this: ``` val DetailAST.siblings: Seque...
# getting-started
f
I now have this:
Copy code
val DetailAST.siblings: Sequence<DetailAST>
    get() = Sequence {
        object : Iterator<DetailAST> {
            var nextSibling : DetailAST? = getNextSibling()

            override fun next(): DetailAST {
                val value = nextSibling ?: throw NoSuchElementException()
                nextSibling = value.nextSibling
                return value
            }

            override fun hasNext(): Boolean {
                return nextSibling != null
            }
        }
    }