Skip to content

Instantly share code, notes, and snippets.

@davidelettieri
Last active April 3, 2020 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidelettieri/05bcd14c55fe22be0841f740b9b55097 to your computer and use it in GitHub Desktop.
Save davidelettieri/05bcd14c55fe22be0841f740b9b55097 to your computer and use it in GitHub Desktop.
public static Func<Result<TSuccess, TError>, Result<TSuccess, TError>> Bind<TSuccess, TError>(Func<TSuccess, Result<TSuccess, TError>> f)
{
return r => r.Match(t => f(t), e => new Result<TSuccess, TError>(e));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment