Open rpiaggio opened 6 years ago
Sounds good 👍
Thank you @krzemin. Upon further thought, the patcher could be abstracted away for reusability (or reusability of the code that applies it):
val patcher = PatcherFor[User](_.email, _.phone, _.address)
user.patchFrom(patcher)(anotherUser)
(Might make sense to curry the application too).
Depends on #538 which in turns depends on #115.
Thank you for this great library! It's incredibly useful together with Diode+React.
Here's a suggestion, which I think naturally falls within the domain of chimney: Being able to patch a case class instance from another instance, specifying the fields to patch. It can be seen as nicer syntax for
.copy(...)
specifying override fields from the other instance.For example:
which would be equivalent to:
Thank you!