diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-26 21:42:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-26 21:42:26 -0700 |
commit | 6aae6f46374216d52fcc9b45592480313606f153 (patch) | |
tree | d2fccc324bcc293f66896b70989d02a186cc4d86 /065duplex_list.mu | |
parent | 9be71ac1f46cd04e61aca00ffabc5324c9dfdf5c (diff) | |
download | mu-6aae6f46374216d52fcc9b45592480313606f153.tar.gz |
2082
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 +] |