Youssef Shoaib [MOD]
11/19/2024, 9:37 PMaccumulate {
val x by accumulating { ... }
val y by accumulating { x }
}
Right now, if x fails, the second accumulating
will fail too. I understand why this happens obv, but might we want something that makes y
an Error
if x
fails? Is that even a useful idea? Are there any pitfalls I've missed?Alejandro Serrano.Mena
11/20/2024, 10:11 AMaccumulating
works indeed on the implicit assumption that your computations are independent. Alas, we cannot restrict it in the same way we do with parZip
, so corner cases like this may occur
Honestly, I think the potential complication to the rules (how does accumulating
decide whether the error should be reported or not?) are worse than having those corner cases, which work maybe surprisingly but at least uniformly