aboutsummaryrefslogtreecommitdiff
path: root/frontend/utilities.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/utilities.dcl')
-rw-r--r--frontend/utilities.dcl8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl
index e6fa88d..3cded9b 100644
--- a/frontend/utilities.dcl
+++ b/frontend/utilities.dcl
@@ -124,11 +124,12 @@ mapFilterYesSt f l st
:== map_filter_yes_st l st
where
map_filter_yes_st [] st
+ #! st = st
= ([], st)
map_filter_yes_st [h:t] st
#! (opt_f_h , st) = f h st
(t2, st) = map_filter_yes_st t st
- f_h_t2 = optCons opt_f_h t2
+ (f_h_t2, _) = optCons opt_f_h t2
st = st
= (f_h_t2, st)
@@ -136,15 +137,16 @@ iMapFilterYesSt f fr to st
:== i_map_filter_yes_st fr to st
where
i_map_filter_yes_st fr to st
+ #! st = st
| fr >= to
= ([], st)
#! (opt_f_fr, st) = f fr st
(t, st) = i_map_filter_yes_st (inc fr) to st
- f_fr_t2 = optCons opt_f_fr t
+ (f_fr_t2, _) = optCons opt_f_fr t
st = st
= (f_fr_t2, st)
-optCons :: !(Optional .a) !u:[.a] -> v:[.a] ,[u <= v]
+optCons :: !(Optional .a) !u:[.a] -> (!v:[.a], !Int) ,[u <= v]
revAppend :: ![a] ![a] -> [a] // Reverse the list using the second argument as accumulator.
revMap :: !(.a -> .b) ![.a] !u:[.b] -> u:[.b]