Commit 30beb7cd authored by Martin Wierich's avatar Martin Wierich
Browse files

added new macro "unsafeFold2St"

parent e466a8dd
......@@ -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
......
......@@ -175,6 +175,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 r l :== fold_st r l
where
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment