]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ListSyntax11.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / ListSyntax11.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ListSyntax11.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ListSyntax11.scl
new file mode 100644 (file)
index 0000000..15f0441
--- /dev/null
@@ -0,0 +1,8 @@
+import "Prelude"\r
+\r
+dists l = sum [sqrt (x*x+y*y) \r
+              | (x,y) <- l ]\r
+              \r
+main = dists [(0,0),(1,1),(2,0)]\r
+--            \r
+3.414213562373095
\ No newline at end of file