Monthly Archives: June 2011

Scala Problem Number Five

From the Scala 99 Problems, the problem number five goes like this: P05 (*) Reverse a list. Example: scala> reverse(List(1, 1, 2, 3, 5, 8)) res0: List[Int] = List(8, 5, 3, 2, 1, 1) Starting with the obvious solution, using … Continue reading

Posted in scala | Tagged , , , , , , | Leave a comment

About nulls and System Properties in Scala

In Scala, it is usually a good idea to avoid nulls in your code. Instead of that, it is recommended that you use the Option class. This is how it works: if the value you are working with is null, … Continue reading

Posted in java, scala | Tagged , , , , , , , | 1 Comment