Ad
Code
Diff
  • const tab = (f, a, b, h) => {
      return [...Array((b - a) / h + 1).keys()]
        .map(n => f(n * h + a))
        .reduce((n, p) => n + p, 0);
    }
    • const tab = (f, a, b, h) => {
    • return [...Array((b - a) / h + 1).keys()]
    • .map(n => f(n * h + a))
    • .reduce((n, p) => n + p, 0);
    • }