Hi, I'm testing arrow-2 now and I've got a little problem. I want to create domain aggregate from two value objects (or collect errors from these two) which are eithers already or return a common Error object if anything goes wrong. How should I code flow like this using arrow-2?
Copy code
DObject_1.create()
.zip(DObject_2.create()) { o1, o2 ->
Aggregate.create(o1,o2) <-- create returns Either<Error, Aggregate>
}
.flatMap( save(it)) <-- it is Either but i want Aggregate here