product type scala code example
Example: product type scala
A product type is generally encoded (scala 2.x) as a:
final case class Foo(field1: Type1,...,fieldN: TypeN)
- it is an immutable persistent data structure
- equal(), hashcode(), apply(), toString() overloaded