As you can see, whenever we have a use case where the structure of an algorithm is the same and we provide different implementations, we can use the template method design pattern. This is a really good fit for creating frameworks.
What it is good for
Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.