Skip to content

Commit

Permalink
del unused Result<T>.Do
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyagusev committed Dec 5, 2019
1 parent 2c8c58b commit b16e3f9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/BookFx/Functional/ResultExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ internal static class ResultExt
public static Result<Unit> ForEach<TR>(this Result<TR> result, Action<TR> action) =>
Map(result, action.ToFunc());

public static Result<T> Do<T>(this Result<T> result, Action<T> action)
{
result.ForEach(action);
return result;
}

public static Result<TR> Bind<T, TR>(this Result<T> result, Func<T, Result<TR>> f) =>
result.Match(
invalid: errors => (Result<TR>)Invalid(errors),
Expand Down

0 comments on commit b16e3f9

Please sign in to comment.