Scala, Design Patterns, Programming, Factory Pattern.
procedure instead of method because it does not have a return type. The logic of it does not intend to produce an output, but instead is intended to produce side effects. The Factory and the ReaderFactory are implemented the following way. trait Factory { def apply(s: String): Reader } object