Skip to content

Instantly share code, notes, and snippets.

@vvviiimmm
Created January 7, 2019 14:36
Show Gist options
  • Save vvviiimmm/f367879795432f34c3c89dce27d10952 to your computer and use it in GitHub Desktop.
Save vvviiimmm/f367879795432f34c3c89dce27d10952 to your computer and use it in GitHub Desktop.
// Person is a product type consisting of 3 fields
case class Person(name: String, age: Int, address: Address)
// Address on its own also is a product type
case class Address(country: String, city: String, street: String)
// In order to create a Point you have to provide all 3 arguments
case class Point(x: Double, y: Double, z: Double)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment