diff options
Diffstat (limited to '065duplex_list.mu')
-rw-r--r-- | 065duplex_list.mu | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/065duplex_list.mu b/065duplex_list.mu index abc1949b..17428862 100644 --- a/065duplex_list.mu +++ b/065duplex_list.mu @@ -367,3 +367,19 @@ scenario removing-from-singleton-list [ 4 <- 0 ] ] + +# l:address:duplex-list <- remove-duplex-between start:address:duplex-list, end:address:duplex-list +# Remove values between 'start' and 'end' (both exclusive). Returns some valid +# pointer into the rest of the list. +recipe remove-duplex-between [ + local-scope + start:address:duplex-list <- next-ingredient + end:address:duplex-list <- next-ingredient + reply-unless start, start + next:address:address:duplex-list <- get-address *start, next:offset + *next <- copy end + reply-unless end, start + prev:address:address:duplex-list <- get-address *end, prev:offset + *prev <- copy start + reply start +] |