Skip to content

Instantly share code, notes, and snippets.

@zsoltk
Created December 22, 2019 13:04
Show Gist options
  • Save zsoltk/482ad0dff3bcc662a5822128bb9cd505 to your computer and use it in GitHub Desktop.
Save zsoltk/482ad0dff3bcc662a5822128bb9cd505 to your computer and use it in GitHub Desktop.
fun replace(element: T) {
elements = elements.dropLast(1) + Entry(element)
}
fun newRoot(element: T) {
elements = listOf(Entry(element))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment