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.
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.
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