Closed ferranpujolcamins closed 3 years ago
I added two new laws to test tailRecM (I took them from Scala).
tailRecM
With the new tailRecMConsistentFlatMap law I discovered and fixed bugs in the implementation of tailRecM for Ior and WriterT.
tailRecMConsistentFlatMap
Ior
WriterT
Both
Right
W
Awesome! Good catch!
I added two new laws to test
tailRecM
(I took them from Scala).With the new
tailRecMConsistentFlatMap
law I discovered and fixed bugs in the implementation oftailRecM
forIor
andWriterT
.Ior
, when flatMapping on aBoth
value, when the new value isRight
, we were returningBoth
(correct value isRight
).WriterT
we were not combining the oldW
with the newW
obtained after flatmapping.