Module 5: Traits

Read good existing material

Read chapter 4 of the book Essential Scala. Complete the exercises. After you have completed the exercises you should have domain of the following:

  • Trait syntax
  • Traits vs Java interfaces
  • Sealed traits
  • Modelling Product Types with traits
  • Modelling Sum Types with the Sum Type Pattern
  • Algebraic Data Types
  • The Product Type Pattern Matching Problem and the Sum Type Pattern Matching Problem
  • A basic understanding of Tail Call Recursion

Complete as many proposed exercises as you can.

If you consider the material is too basic for you, then you may skip the exercises. But do not skip the exercises if you don’t understand the concepts mentioned in previous section.