ValidatedNestedOps<E, A>
Operations available when a Validated contains another Validated as its valid value.
Methods
flatten() extension
Validated<E, A> flatten()Extracts the nested Validated via fold.
Available on Validated<E, A>, provided by the ValidatedNestedOps<E, A> extension
Implementation
dart
Validated<E, A> flatten() => fold(
(e) => e.invalid(),
(va) => va.fold(
(e) => e.invalid(),
(a) => a.valid(),
),
);