- Methods can take functions as parameters: this applies to code blocks.
- Partially applied functions: you can turn a method of any object into a function that can then be assigned to a variable (and passed around as a parameter).
- Use a Scala object to store "static" methods.
- Use Scala import to import an object's methods.
The code is quite simple, and I mainly wrote it to gain a better understanding of the way Scala handles functions. If you find this interesting, I suggest you have look at StopWatch, an open source library to monitor your JVM applications. It has a ton of interesting features including statistics and nice graphs.