aboutsummaryrefslogtreecommitdiff
path: root/sucl
diff options
context:
space:
mode:
authorzweije2001-08-20 11:51:34 +0000
committerzweije2001-08-20 11:51:34 +0000
commit9103ba5ebd8ad67968707e9e85eda1440f4b650f (patch)
treef0aaeb42a9ca34af24246c12d3833ff9c54df13b /sucl
parentThis commit was generated by cvs2svn to compensate for changes in r656, (diff)
This commit was generated by cvs2svn to compensate for changes in r660,
which included commits to RCS files with non-trunk default branches. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@661 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'sucl')
-rw-r--r--sucl/basic.dcl3
-rw-r--r--sucl/basic.icl3
2 files changed, 6 insertions, 0 deletions
diff --git a/sucl/basic.dcl b/sucl/basic.dcl
index c51d57e..0d06233 100644
--- a/sucl/basic.dcl
+++ b/sucl/basic.dcl
@@ -184,3 +184,6 @@ stub :: .String .String .String -> .a
// `Superset xs ys' determines whether ys is a superset (actually, super-multi-set or super-list) of xs.
superset :: .[a] -> .(.[a] -> Bool) | == a
+
+// zipwith zips up two lists with a joining function
+zipwith :: (.a .b->.c) ![.a] [.b] -> [.c]
diff --git a/sucl/basic.icl b/sucl/basic.icl
index 270b13a..7319b67 100644
--- a/sucl/basic.icl
+++ b/sucl/basic.icl
@@ -265,3 +265,6 @@ stub modulename functionname message
superset :: .[a] -> .(.[a] -> Bool) | == a
superset set = isEmpty o (removeMembers set)
+
+zipwith :: (.a .b->.c) ![.a] [.b] -> [.c]
+zipwith f xs ys = [f x y \\ x<-xs & y<-ys]