]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Fibonacci2.scl
Supply SVG text editor with element measurement context
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Fibonacci2.scl
1 import "Prelude"
2
3 fibonacci :: Integer -> Integer
4 fibonacci x = if x <= 1 
5               then 1 
6               else fibonacci (x - 1) 
7                  + fibonacci (x - 2)
8
9 main = fibonacci 10
10 --
11 89