Created
January 31, 2020 16:27
-
-
Save hderms/3c32e919f3b1e28ce4d5674c04e7ff71 to your computer and use it in GitHub Desktop.
chimney library hypothetical
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
//The input datatype that we want to 'split' | |
case class Input(age: Int, date: LocalDate, name: String, range: Range.Inclusive) | |
//wrapper A receives some of the elements that are 'split out' | |
case class WrapperA(age: Int, date: LocalDate) | |
// wrapper B retains the rest | |
case class WrapperB(range: Range.Inclusive, name: String) | |
//the output type we'd like to transform Input into | |
case class TransformInto(wrapperA: WrapperA, wrapperB: WrapperB) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment