]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects3.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Effects3.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects3.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects3.scl
new file mode 100644 (file)
index 0000000..7184829
--- /dev/null
@@ -0,0 +1,12 @@
+effectfulId :: a -> <Proc> a\r
+effectfulId x = x\r
+\r
+(.) :: (b -> <e> c) -> (a -> <e> b) -> a -> <e> c\r
+(f . g) x = f (g x)\r
+\r
+doubleId = effectfulId . effectfulId\r
+\r
+main :: Integer\r
+main = runProc (doubleId (13 :: Integer))\r
+--\r
+13
\ No newline at end of file