]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scripts/Functions.sts
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scripts / Functions.sts
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scripts/Functions.sts b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scripts/Functions.sts
new file mode 100644 (file)
index 0000000..76348b8
--- /dev/null
@@ -0,0 +1,20 @@
+> id x = x
+> id 2
+2
+> id "Hello!"
+"Hello!"
+
+> id = \x -> x
+> id 2
+2
+
+> fib 0 = 1
+> fib 1 = 1
+> fib n = fib (n-1) + fib (n-2)
+
+> fib 2
+2
+> fib 3
+3
+> fib 4
+5
\ No newline at end of file