invert

Inverts the Outcome so that the Outcome.Success value becomes the Outcome.Failure error and vice versa.

Return

A new Outcome with the values inverted.

Parameters

Ok

The Ok type of the receiver Outcome, and Error type of the returned Outcome.

Error

The Error type of the receiver Outcome, and Ok type of the returned Outcome.