You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like HappyPath.attempt(ActionThatMightFail<Happy, Sad> actionThatMightFail) can go from happy to sad based on the PotentialFailure<Sad> result of the ActionThatMightFail, I can imagine a SadPath.attempt(ActionThatMightRecover<Happy, Sad> actionThatMightRecover) that can go from sad to happy based on a PotentialRecovery<Happy> result of the ActionThatMightRecover.
It would probably just be a copy-paste job to implement, based around the existing happy attempt method and everything it depends on. There might be a better name than "attempt" too I can't think of one right now though.
Like the PotentialFailure class but for sad recoveries
The text was updated successfully, but these errors were encountered: