]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl
New type class MonadE and corresponding monad syntax with edo keyword
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / MonadSyntax3.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl
new file mode 100644 (file)
index 0000000..fa36d0e
--- /dev/null
@@ -0,0 +1,18 @@
+import "Prelude"
+
+a = ["a", "b"]
+b = [1, 2]
+
+main = edo 
+  x <- a
+  return $ print x
+  y <- b
+  return $ print y
+--
+a
+1
+2
+b
+1
+2
+[(), (), (), ()]
\ No newline at end of file