]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Guards2.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Guards2.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Guards2.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Guards2.scl
new file mode 100644 (file)
index 0000000..88734c1
--- /dev/null
@@ -0,0 +1,10 @@
+import "Prelude"\r
+\r
+fib :: Integer -> Integer\r
+fib x = match x with\r
+  v | v <= 2 -> 1\r
+    | True   -> fib (v-1) + fib (v-2)\r
+\r
+main = fib 13\r
+--\r
+233
\ No newline at end of file