Created
October 4, 2013 12:37
-
-
Save lazyval/6825280 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
val l1 = LinkedList(1) | |
l1.append(LinkedList(7)) | |
l1 | |
// res14: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 7) | |
val l0 = LinkedList[Int]() | |
l0.append(LinkedList(7)) | |
l0 | |
// res16: scala.collection.mutable.LinkedList[Int] = LinkedList() | |
// Not a bug per see, but rather a *feature* as scaladoc states | |
// /** If `this` is empty then it does nothing and returns `that`. Otherwise, appends `that` to `this`. The append | |
// * requires a full traversal of `this`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:(