diff options
author | johnvg | 2002-09-24 10:49:13 +0000 |
---|---|---|
committer | johnvg | 2002-09-24 10:49:13 +0000 |
commit | 65e4b5f4ca80446610821b934e86ba2ad98e9743 (patch) | |
tree | d56c74ed5ce8c4d99acd36cc6639b2934537bde4 | |
parent | fixed bug in mergecases for dynamics (result from a failed experiment) (diff) |
removed second_of_2_tuple in mapSt
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1206 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/utilities.dcl | 10 | ||||
-rw-r--r-- | frontend/utilities.icl | 10 |
2 files changed, 6 insertions, 14 deletions
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl index 1d3967b..cd822aa 100644 --- a/frontend/utilities.dcl +++ b/frontend/utilities.dcl @@ -41,16 +41,12 @@ mapSt f l s :== map_st l s where map_st [x : xs] s # (x, s) = f x s - mapSt_result = map_st xs s - (xs, _) = mapSt_result - #! s = second_of_2_tuple mapSt_result + (xs, s) = map_st xs s + #! s = s = ([x : xs], s) map_st [] s + #! s = s = ([], s) - -second_of_2_tuple t :== e2 - where - (_,e2) = t map2St f l1 l2 st :== map2_st l1 l2 st where diff --git a/frontend/utilities.icl b/frontend/utilities.icl index efcd741..01f8533 100644 --- a/frontend/utilities.icl +++ b/frontend/utilities.icl @@ -135,17 +135,13 @@ mapSt f l s :== map_st l s where map_st [x : xs] s # (x, s) = f x s - mapSt_result = map_st xs s - (xs, _) = mapSt_result - #! s = second_of_2_tuple mapSt_result + (xs, s) = map_st xs s + #! s = s = ([x : xs], s) map_st [] s + #! s = s = ([], s) -second_of_2_tuple t :== e2 - where - (_,e2) = t - map2St f l1 l2 st :== map2_st l1 l2 st where map2_st [h1:t1] [h2:t2] st |