flattenNestedBoth

Flattens nested Outcome values from both the Success and Failure states into a single Outcome.

The returned value and error types are the nearest common AncestorOk and AncestorError across both branches.

Parameters

SuccessOk

The Success value type nested inside the Success state.

SuccessError

The Failure error type nested inside the Success state.

FailureOk

The Success value type nested inside the Failure state.

FailureError

The Failure error type nested inside the Failure state.

AncestorOk

The nearest common ancestor of SuccessOk and FailureOk.

AncestorError

The nearest common ancestor of SuccessError and FailureError.

See also