Guest User

Untitled

a guest
Apr 23rd, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.41 KB | None | 0 0
  1. scala>  def putInt(l:collection.mutable.ListBuffer[Any]) {  l += 0 }
  2. putInt: (l: scala.collection.mutable.ListBuffer[Any])Unit
  3.  
  4. scala>  import collection.mutable.ListBuffer
  5.  
  6. val list = new ListBuffer[String]
  7. import collection.mutable.ListBuffer
  8.  
  9. scala> list: scala.collection.mutable.ListBuffer[String] = ListBuffer()
  10.  
  11. scala>  putInt(list.asInstanceOf[ListBuffer[Any]])
  12.  
  13. scala>  println(list)
  14. ListBuffer(0)
Advertisement
Add Comment
Please, Sign In to add comment