-
-
Save jillesme/d1e1af0e0f56f8b5e02d27f9bc17afa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val newX = x.copy( | |
a = if (fields.contain("a")) x.a else y.a | |
b = if (fields.contain("b")) x.b else y.b | |
c = if (fields.contain("c")) x.c else y.c | |
) | |
// Is there a nicer way that i could do: | |
val newX = x.copy(a = getCorrect("a"), b = getCorrect("b'), c = getCorrect("c")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment