From 9b0c8596c6b9785285604c081243e24360ddfbfe Mon Sep 17 00:00:00 2001 From: johnvg Date: Tue, 6 Sep 2011 09:46:48 +0000 Subject: move mapSt2 and mapY2St from module check to module utilities git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1968 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/utilities.dcl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'frontend/utilities.dcl') diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl index 8ffad4f..63d7135 100644 --- a/frontend/utilities.dcl +++ b/frontend/utilities.dcl @@ -37,6 +37,28 @@ where #! s = s = ([], s) +mapSt2 f l s1 s2 :== map_st2 l s1 s2 +where + map_st2 [x : xs] s1 s2 + # (x, s1,s2) = f x s1 s2 + (xs, s1,s2) = map_st2 xs s1 s2 + #! s1 = s1 + #! s2 = s2 + = ([x : xs], s1,s2) + map_st2 [] s1 s2 + = ([], s1,s2) + +mapY2St f l s :== map_y2_st l s +where + map_y2_st [x : xs] s + # (x, y, s) = f x s + (xs, ys, s) = map_y2_st xs s + #! s = s + = ([x : xs], [y : ys], s) + map_y2_st [] s + #! s = s + = ([], [], s) + map2St f l1 l2 st :== map2_st l1 l2 st where map2_st [h1:t1] [h2:t2] st -- cgit v1.2.3