Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created March 11, 2012 08:00
Show Gist options
  • Save xuwei-k/2015513 to your computer and use it in GitHub Desktop.
Save xuwei-k/2015513 to your computer and use it in GitHub Desktop.
scala.collection.immutable.List is not immutable !
package scala.ListTest
object Main{
def changeList[A](l:List[A],tail:List[A]){
l match {
case cons: ::[A] => cons.tl = tail
case _ =>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment