]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Scanl.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Scanl.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Scanl.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Scanl.scl
deleted file mode 100644 (file)
index 67821dd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-import "Prelude" hiding (scanl)\r
-\r
-scanl :: (b -> a -> <e> b) -> b -> [a] -> <e> [b]\r
-scanl f initial l = build (loop initial 0)\r
-  where\r
-    len = length l\r
-    loop cur i accum cons = let nl = cons accum cur\r
-                            in if i==len\r
-                               then nl\r
-                               else loop (f cur (l!i)) (i+1) nl cons\r
-                               \r
-main = scanl (+) 0 [1,2,3]\r
---\r
-[0, 1, 3, 6]
\ No newline at end of file