Slide 42
Slide 42 text
case classͱtuple
case class Person(name: String, age: Int, hat: Boolean)
case class Food(name: String, size: Int, hot: Boolean)
val person = Person("person", 29, true)
val ramen = Food("ramen", 3, true)
val tuple: (String, Int, Boolean) = ("tuple", 25, false)
• PersonStringܕ, Intܕ, BooleanܕͷϑΟʔϧυΛ͍࣋ͬͯΔ
• FoodStringܕ, Intܕ, BooleanܕͷϑΟʔϧυΛ͍࣋ͬͯΔ
• ্هྫͷtupleStringܕ, Intܕ, BooleanܕΛ͍࣋ͬͯΔ
DBTFDMBTTͱUVQMF99ܕͷΛ࣋ͭ
σʔλߏͱͯ͠ҰൠԽ͢Δ͜ͱ͕Ͱ͖Δ