From cdc49b378ad49f614df55c79f5301b02cb21797d Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Tue, 20 Sep 2022 03:06:56 +0400 Subject: [PATCH] cleanup --- packages/squiggle-lang/examples/integrate.squiggle | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 packages/squiggle-lang/examples/integrate.squiggle diff --git a/packages/squiggle-lang/examples/integrate.squiggle b/packages/squiggle-lang/examples/integrate.squiggle deleted file mode 100644 index d41e18c7..00000000 --- a/packages/squiggle-lang/examples/integrate.squiggle +++ /dev/null @@ -1,13 +0,0 @@ -integrate(fun, min, max) = { - // assume that min and max are integers. - epsilon = 1 - l = max - min - meanF(t) = fun(t) - intervals = map(List.upTo(0, (l/epsilon)), ({|n| min + n*epsilon})) - values = map(intervals, ({ |x | meanF(x)})) - result = reduce(values, 0, ({|acc, x| acc + x})) * epsilon - result -} - -f(x) = x -integrate(f, 1, 100k)