]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/performance/SumOfInverses.scl
Merge commit 'bf75fd9'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / performance / SumOfInverses.scl
1 import "Prelude"\r
2 \r
3 main :: Double -> Double\r
4 main m = loop 1 0\r
5   where\r
6     loop x cur = if x > m\r
7                  then cur\r
8                  else loop (x+1) (cur + 1 / x)