Posts tagged with "scala"
February 24th, 2013
December 7th, 2011
In Scala, you can use the underscore (_) to refer to an argument you are lazy to name. val numbers = List(1,2,3,4) numbers.map(2 * _) // List(2, 4, 6, 8) You can go a step further. val numbers = List(1,2,3,4) numbers.map(2*) You can completely omit the _ as well, because * is actually a method [...]
November 27th, 2011
I generally hate language wars. Yet, time and again, we somehow end up with debates about cancers, EJB2 and what not. I have been programming for a fair amount of time now (both in the functional and imperative paradigms), and for the past two months, I have been using Scala at work. I thought I [...]
November 2nd, 2011
I am still trying to overcome my distaste towards JVM based languages, but Scala makes an intriguing study. And, it has certainly grown on me over the past month. Anyway, I thought it’s worth mentioning the use of backticks (``) in Scala. Scala allows you to define identifiers that start and end with backticks and [...]