Tom Davis
11/17/2022, 10:03 PMList<() -> Validated<E, A>>
which i want to transform into ValidatedNel<E, A>
by:
1. specifying invalid value if the list is empty
2. calling items until the first valid value is encountered
3. aggregating invalid values until (2)
4. ignoring items after (2)
i can come up with an "ugly" way to do this easily enough, but i'm curious if there's a nice fluent pattern for it. thanks in advance!simon.vergauwen
11/18/2022, 7:27 AM2
. traverse
will continue running after encountering the first valid value.Tom Davis
11/18/2022, 3:05 PMseparateValidated()
with a Sequence
is my closest approximation that allows avoiding traversal past the first valid value.