code_junkie

“Arrays” in Scala

Nov 11th, 2011
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. ["a string", 10, {x : 1}, function() {}].push("another value");
  2.  
  3. Vector("a string", 10, Map(x -> 1), ()=>()) + "another value"
  4.  
  5. Array(1, 2, 3, 4) // => Array[Int] containing [1, 2, 3, 4]
  6.  
  7. Array("a string", 10, new { val x = 1 }, () => ()) :+ "another value"
Add Comment
Please, Sign In to add comment