public static IFailableResult <TNewResult, TFailure> OnSuccess <TResult, TFailure, TNewResult>(
     this IFailableResult <TResult, TFailure> result,
     Func <TResult, TNewResult> onSuccess
     ) =>
 result.Handle(
     s => SuccessResult <TNewResult, TFailure> .Create(onSuccess(s)),
     f => FailureResult <TNewResult, TFailure> .Create(f));
 public static IFailableResult <TResult, TNewFailure> OnFailure <TResult, TFailure, TNewFailure>(
     this IFailableResult <TResult, TFailure> result,
     Func <TFailure, IFailableResult <TResult, TNewFailure> > onFailure
     ) =>
 result.Handle(
     s => SuccessResult <TResult, TNewFailure> .Create(s),
     f => onFailure(f));
 public static Task <IFailableResult <TNewResult, TFailure> > OnSuccessAsync <TResult, TFailure, TNewResult>(
     this IFailableResult <TResult, TFailure> result,
     Func <TResult, Task <TNewResult> > onSuccess,
     bool configureAwait = false
     ) =>
 result.Handle(
     async s => SuccessResult <TNewResult, TFailure> .Create(await onSuccess(s).ConfigureAwait(configureAwait)),
     FailureResult <TNewResult, TFailure> .CreateAsync);
 public static Task <IFailableResult <TNewResult, TFailure> > OnSuccessAsync <TResult, TFailure, TNewResult>(
     this Task <IFailableResult <TResult, TFailure> > asyncResult,
     Func <TResult, TNewResult> onSuccess,
     bool configureAwait = false
     ) =>
 asyncResult.HandleAsync(
     s => SuccessResult <TNewResult, TFailure> .Create(onSuccess(s)),
     f => FailureResult <TNewResult, TFailure> .Create(f),
     configureAwait);
 public static Task <IFailableResult <TResult, TNewFailure> > OnFailureAsync <TResult, TFailure, TNewFailure>(
     this Task <IFailableResult <TResult, TFailure> > asyncResult,
     Func <TFailure, IFailableResult <TResult, TNewFailure> > onFailure,
     bool configureAwait = false
     ) =>
 asyncResult.HandleAsync(
     s => SuccessResult <TResult, TNewFailure> .Create(s),
     f => onFailure(f),
     configureAwait);