From 4a48bedcd1d708a43d43dc6259a4e45c52ea3d00 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 3 Dec 2017 23:25:40 -0800 Subject: 4134 - 'input' = 'ingredient' --- html/065duplex_list.mu.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'html/065duplex_list.mu.html') diff --git a/html/065duplex_list.mu.html b/html/065duplex_list.mu.html index d01d6819..e0bde027 100644 --- a/html/065duplex_list.mu.html +++ b/html/065duplex_list.mu.html @@ -70,7 +70,7 @@ if ('onhashchange' in window) { 8 9 def push x:_elem, in:&:duplex-list:_elem/contained-in:result -> result:&:duplex-list:_elem [ 10 local-scope - 11 load-ingredients + 11 load-inputs 12 result:&:duplex-list:_elem <- new {(duplex-list _elem): type} 13 *result <- merge x, in, 0 14 return-unless in @@ -79,21 +79,21 @@ if ('onhashchange' in window) { 17 18 def first in:&:duplex-list:_elem -> result:_elem [ 19 local-scope - 20 load-ingredients + 20 load-inputs 21 return-unless in, 0 22 result <- get *in, value:offset 23 ] 24 25 def next in:&:duplex-list:_elem -> result:&:duplex-list:_elem/contained-in:in [ 26 local-scope - 27 load-ingredients + 27 load-inputs 28 return-unless in, 0 29 result <- get *in, next:offset 30 ] 31 32 def prev in:&:duplex-list:_elem -> result:&:duplex-list:_elem/contained-in:in [ 33 local-scope - 34 load-ingredients + 34 load-inputs 35 return-unless in, 0 36 result <- get *in, prev:offset 37 return result @@ -143,7 +143,7 @@ if ('onhashchange' in window) { 81 82 def length l:&:duplex-list:_elem -> result:num [ 83 local-scope - 84 load-ingredients + 84 load-inputs 85 result <- copy 0 86 { 87 ¦ break-unless l @@ -156,7 +156,7 @@ if ('onhashchange' in window) { 94 # insert 'x' after 'in' 95 def insert x:_elem, in:&:duplex-list:_elem -> in:&:duplex-list:_elem [ 96 local-scope - 97 load-ingredients + 97 load-inputs 98 new-node:&:duplex-list:_elem <- new {(duplex-list _elem): type} 99 *new-node <- put *new-node, value:offset, x 100 # save old next before changing it @@ -285,7 +285,7 @@ if ('onhashchange' in window) { 223 # pointers to the head are now invalid. 224 def remove x:&:duplex-list:_elem/contained-in:in, in:&:duplex-list:_elem -> in:&:duplex-list:_elem [ 225 local-scope -226 load-ingredients +226 load-inputs 227 # if 'x' is null, return 228 return-unless x 229 next-node:&:duplex-list:_elem <- get *x, next:offset @@ -409,7 +409,7 @@ if ('onhashchange' in window) { 347 348 def remove x:&:duplex-list:_elem/contained-in:in, n:num, in:&:duplex-list:_elem -> in:&:duplex-list:_elem [ 349 local-scope -350 load-ingredients +350 load-inputs 351 i:num <- copy 0 352 curr:&:duplex-list:_elem <- copy x 353 { @@ -446,7 +446,7 @@ if ('onhashchange' in window) { 384 # clean way to return the new head pointer. 385 def remove-between start:&:duplex-list:_elem, end:&:duplex-list:_elem/contained-in:start -> start:&:duplex-list:_elem [ 386 local-scope -387 load-ingredients +387 load-inputs 388 next:&:duplex-list:_elem <- get *start, next:offset 389 nothing-to-delete?:bool <- equal next, end 390 return-if nothing-to-delete? @@ -586,7 +586,7 @@ if ('onhashchange' in window) { 524 # insert list beginning at 'start' after 'in' 525 def splice in:&:duplex-list:_elem, start:&:duplex-list:_elem/contained-in:in -> in:&:duplex-list:_elem [ 526 local-scope -527 load-ingredients +527 load-inputs 528 return-unless in 529 return-unless start 530 end:&:duplex-list:_elem <- last start @@ -603,7 +603,7 @@ if ('onhashchange' in window) { 541 # insert contents of 'new' after 'in' 542 def insert in:&:duplex-list:_elem, new:&:@:_elem -> in:&:duplex-list:_elem [ 543 local-scope -544 load-ingredients +544 load-inputs 545 return-unless in 546 return-unless new 547 len:num <- length *new @@ -624,7 +624,7 @@ if ('onhashchange' in window) { 562 563 def append in:&:duplex-list:_elem, new:&:duplex-list:_elem/contained-in:in -> in:&:duplex-list:_elem [ 564 local-scope -565 load-ingredients +565 load-inputs 566 last:&:duplex-list:_elem <- last in 567 *last <- put *last, next:offset, new 568 return-unless new @@ -633,7 +633,7 @@ if ('onhashchange' in window) { 571 572 def last in:&:duplex-list:_elem -> result:&:duplex-list:_elem [ 573 local-scope -574 load-ingredients +574 load-inputs 575 result <- copy in 576 { 577 ¦ next:&:duplex-list:_elem <- next result @@ -646,7 +646,7 @@ if ('onhashchange' in window) { 584 # does a duplex list start with a certain sequence of elements? 585 def match x:&:duplex-list:_elem, y:&:@:_elem -> result:bool [ 586 local-scope -587 load-ingredients +587 load-inputs 588 i:num <- copy 0 589 max:num <- length *y 590 { @@ -691,7 +691,7 @@ if ('onhashchange' in window) { 629 # helper for debugging 630 def dump-from x:&:duplex-list:_elem [ 631 local-scope -632 load-ingredients +632 load-inputs 633 $print x, [: ] 634 { 635 ¦ break-unless x @@ -724,7 +724,7 @@ if ('onhashchange' in window) { 662 663 def to-text in:&:duplex-list:_elem -> result:text [ 664 local-scope -665 load-ingredients +665 load-inputs 666 buf:&:buffer:char <- new-buffer 80 667 buf <- to-buffer in, buf 668 result <- buffer-to-array buf @@ -733,7 +733,7 @@ if ('onhashchange' in window) { 671 # variant of 'to-text' which stops printing after a few elements (and so is robust to cycles) 672 def to-text-line in:&:duplex-list:_elem -> result:text [ 673 local-scope -674 load-ingredients +674 load-inputs 675 buf:&:buffer:char <- new-buffer 80 676 buf <- to-buffer in, buf, 6 # max elements to display 677 result <- buffer-to-array buf @@ -741,7 +741,7 @@ if ('onhashchange' in window) { 679 680 def to-buffer in:&:duplex-list:_elem, buf:&:buffer:char -> buf:&:buffer:char [ 681 local-scope -682 load-ingredients +682 load-inputs 683 { 684 ¦ break-if in 685 ¦ buf <- append buf, [[]] @@ -756,9 +756,9 @@ if ('onhashchange' in window) { 694 return-unless next 695 buf <- append buf, [ <-> ] 696 # and recurse -697 remaining:num, optional-ingredient-found?:bool <- next-ingredient +697 remaining:num, optional-input-found?:bool <- next-input 698 { -699 ¦ break-if optional-ingredient-found? +699 ¦ break-if optional-input-found? 700 ¦ # unlimited recursion 701 ¦ buf <- to-buffer next, buf 702 ¦ return -- cgit 1.4.1-2-gfad0