]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/src-isv/Lists.mediawiki
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src-isv / Lists.mediawiki
diff --git a/bundles/org.simantics.scl.runtime/src-isv/Lists.mediawiki b/bundles/org.simantics.scl.runtime/src-isv/Lists.mediawiki
new file mode 100644 (file)
index 0000000..2869a23
--- /dev/null
@@ -0,0 +1,19 @@
+== Working with lists ==\r
+\r
+\r
+\r
+Note that some of these functions work also for other\r
+data structures than lists. \r
+<pre>\r
+!\r
++\r
+foldl\r
+foldl1\r
+map f l        = [f x | x <- l]\r
+filter p l     = [x | x <- l, p x]\r
+sum l          = [y | x <- l, y <- x]\r
+join l         = sum l\r
+concatMap f l  = [y | x <- l, y <- f x]\r
+zip l m        = [(x,y) | x <- l | y <- m]\r
+zipWith f l m  = [f x y | x <- l | y <- m]\r
+</pre>
\ No newline at end of file