Closed buritos closed 4 years ago
Looks good to me! I would like to know the implication of doing this with RepetableCompletes. @VaughnVernon
implication of doing this with RepetableCompletes
thanks for pointing that out, @kmruiz
@kmruiz @buritos I am not certain about implications for RepeatableCompletes
, but it doesn't seem to have anything to interfere there. Sort of the only thing that differs with RepeatableCompletes
is that after an outcome it is made to look like it is fresh again, but without allocation (using mutation) and this does not happen until repeat()
is used by the client. Assuming that the client is the one controlling the use of interchange()
it would seem to occur before the repeat()
.
@VaughnVernon should I add a test with RepeatableCompletes
?
@buritos Yes please.
@VaughnVernon @kmruiz I tried to test invert
(renamed from interchange
) with RepeatableCompletes
. It works, although I expected that the way I structured the test should not compile! I have posted the code on Slack. I also tested some other variations, some of which worked, others didn't (timed-out) but can't explain why any of that is valid code. I can share more on Slack in case you are interested. I decided not to commit any of that since invert
is thoroughly covered by the tests I already included and I believe that those issues have nothing to do with the implementation of invert
. Merging this now so that @wwerner can make progress in schemata 🎉
(Outcome<E, Completes<A>>) -> Completes<Outcome<E, A>>