Scala : learning box