Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Sep 6th, 2010  |  syntax: Scala  |  size: 0.23 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. scala> def f(s: String) =  s.toInt; def f(s: String, b: Int) = s.toInt
  2. f: (s: String,b: Int)Int <and> (s: String)Int
  3. f: (s: String,b: Int)Int <and> (s: String)Int
  5. scala> Array("32", "25") map f
  6. res1: Array[Int] = Array(32, 25)
clone this paste RAW Paste Data