Answers for "product types in scala"

1

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
Posted by: Guest on May-28-2021

Browse Popular Code Answers by Language