You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Can you provide something like optional patcher? The idea would be to do something like this:
case class Foo(a: String, b: Int, c: Double)
case class Bar(a: Option[String], b: Option[Int])
val f = Foo("aaa", 123, 0.33)
val b = Bar(None, Some(987))
f.patchWithOpt(b) should be Foo("aaa", 987, 0.33)
At the moment the way I can do it is:
f.copy(a = b.getOrElse(f.a), ...)
The text was updated successfully, but these errors were encountered:
Hi. Can you provide something like optional patcher? The idea would be to do something like this:
At the moment the way I can do it is:
The text was updated successfully, but these errors were encountered: