Looking at the new `accumulate` DSL in Arrow 2, I ...
# arrow
u
Looking at the new
accumulate
DSL in Arrow 2, I was surprised to see that `ensureNotNullOrAccumulate`returns
Unit
instead of the non-null value. The latter would be consistent with how
ensureNotNull
and
requireNotNull
works. Is there a reason for this surprising behavior?
y
if the value is null,
ensureNotNullOrAccumulate
doesn't actually
raise
, instead it accumulates that error. This means that after that call, your value may still be null. Maybe it should return
RaiseAccumulate.Value<T!!>
though
👍 1