Created
December 22, 2019 13:04
-
-
Save zsoltk/482ad0dff3bcc662a5822128bb9cd505 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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