Updating a scala case class [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Update operations on a Scala Case Class This question came to me this evening. I have two instantiated case classes of the same type. case class Foo(a : Option[String], b : Option[String], c : Option[String]) Lets call the instantiated classes A and B. val a = Foo(a=Some("foo"), b=Some("bar"), c=Some("baz")) val b = Foo(a=None, b=Some("etch"), c=None) I'm wondering if its possible to update case class A with B