public static TimeSpan NextInterval(this IntervalFunction function, int attempts) { return(function switch { IntervalFunction.ExponentialBackoff => ExponentialBackoff(attempts), _ => throw new ArgumentOutOfRangeException(nameof(function), function, null) });
public DefiniteIntegral Integrate(IntervalFunction intervalFunction) { return(Integrate(intervalFunction.function, intervalFunction.interval.a, intervalFunction.interval.b)); }