Category Archives: Scala

Scala preconditions (assert, assume, require, ensuring)

Scala provides a set of preconditions functions (assert, assume, require, ensuring).

In addition to the actual functionality of dynamically check invariants, these functions are used for documentation and static code analysis.

Continue reading

The Adapter Design Pattern in Scala using implicits

Comparing to the standard implementations  of Adapter Pattern by GoF – Scala have a better, shorter, and fancier way to implement it. In this post I’m going to explain and guide how to implement and use the Adapter design pattern in Scala (using implicits). Continue reading