diff options
Diffstat (limited to '065duplex_list.mu')
-rw-r--r-- | 065duplex_list.mu | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/065duplex_list.mu b/065duplex_list.mu index 97541f33..30552fb6 100644 --- a/065duplex_list.mu +++ b/065duplex_list.mu @@ -6,17 +6,13 @@ container duplex-list:_elem [ prev:&:duplex-list:_elem ] -# should I say in/contained-in:result, allow ingredients to refer to products? -def push x:_elem, in:&:duplex-list:_elem -> in:&:duplex-list:_elem [ +def push x:_elem, in:&:duplex-list:_elem/contained-in:result -> result:&:duplex-list:_elem [ local-scope load-ingredients result:&:duplex-list:_elem <- new {(duplex-list _elem): type} *result <- merge x, in, 0 - { - break-unless in - *in <- put *in, prev:offset, result - } - return result # needed explicitly because we need to replace 'in' with 'result' + return-unless in + put *in, prev:offset, result ] def first in:&:duplex-list:_elem -> result:_elem [ |