aboutsummaryrefslogtreecommitdiff
path: root/frontend/utilities.dcl
diff options
context:
space:
mode:
authormartinw2000-10-26 11:26:34 +0000
committermartinw2000-10-26 11:26:34 +0000
commit36c590e4ce0a4e108b251a71bc5b5e6c186539cc (patch)
tree0ede559fb307375d4151b10a54322582df67b084 /frontend/utilities.dcl
parentremoved trace (diff)
added new macro "unsafeFold2St"
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@269 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/utilities.dcl')
-rw-r--r--frontend/utilities.dcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl
index 664375b..a513a36 100644
--- a/frontend/utilities.dcl
+++ b/frontend/utilities.dcl
@@ -89,6 +89,14 @@ where
fold_st2 xs [] st
= abort ("fold_st2: first argument list contains more elements")
+unsafeFold2St op l1 l2 st
+ :== ufold_st2 l1 l2 st
+where
+ ufold_st2 [x : xs] [y : ys] st
+ = op x y (ufold_st2 xs ys st)
+ ufold_st2 _ _ st
+ = st
+
// foldSt :: !(.a -> .(.st -> .st)) ![.a] !.st -> .st
foldSt op l st :== fold_st l st