about summary refs log tree commit diff stats
path: root/html/065duplex_list.mu.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/065duplex_list.mu.html')
-rw-r--r--html/065duplex_list.mu.html176
1 files changed, 137 insertions, 39 deletions
diff --git a/html/065duplex_list.mu.html b/html/065duplex_list.mu.html
index 8f0cf4a8..59924127 100644
--- a/html/065duplex_list.mu.html
+++ b/html/065duplex_list.mu.html
@@ -561,7 +561,7 @@ if ('onhashchange' in window) {
 <span id="L499" class="LineNr">499 </span>  <span class="Constant">load-ingredients</span>
 <span id="L500" class="LineNr">500 </span>  <span class="muControl">return-unless</span> in
 <span id="L501" class="LineNr">501 </span>  <span class="muControl">return-unless</span> start
-<span id="L502" class="LineNr">502 </span>  end:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L522'>last</a> start
+<span id="L502" class="LineNr">502 </span>  end:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L544'>last</a> start
 <span id="L503" class="LineNr">503 </span>  <a href='065duplex_list.mu.html#L29'>next</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> in
 <span id="L504" class="LineNr">504 </span>  <span class="Delimiter">{</span>
 <span id="L505" class="LineNr">505 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L29'>next</a>
@@ -572,47 +572,145 @@ if ('onhashchange' in window) {
 <span id="L510" class="LineNr">510 </span>  *start <span class="Special">&lt;-</span> put *start, <span class="Constant"><a href='065duplex_list.mu.html#L36'>prev</a>:offset</span>, in
 <span id="L511" class="LineNr">511 </span>]
 <span id="L512" class="LineNr">512 </span>
-<span id="L513" class="LineNr">513 </span><span class="muRecipe">def</span> append in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem, new:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem/contained-in:in<span class="muRecipe"> -&gt; </span>in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
-<span id="L514" class="LineNr">514 </span>  <span class="Constant">local-scope</span>
-<span id="L515" class="LineNr">515 </span>  <span class="Constant">load-ingredients</span>
-<span id="L516" class="LineNr">516 </span>  <a href='065duplex_list.mu.html#L522'>last</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L522'>last</a> in
-<span id="L517" class="LineNr">517 </span>  *last <span class="Special">&lt;-</span> put *last, <span class="Constant"><a href='065duplex_list.mu.html#L29'>next</a>:offset</span>, new
+<span id="L513" class="LineNr">513 </span><span class="Comment"># insert contents of 'new' after 'in'</span>
+<span id="L514" class="LineNr">514 </span><span class="muRecipe">def</span> insert in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem, new:&amp;:@:_elem<span class="muRecipe"> -&gt; </span>in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
+<span id="L515" class="LineNr">515 </span>  <span class="Constant">local-scope</span>
+<span id="L516" class="LineNr">516 </span>  <span class="Constant">load-ingredients</span>
+<span id="L517" class="LineNr">517 </span>  <span class="muControl">return-unless</span> in
 <span id="L518" class="LineNr">518 </span>  <span class="muControl">return-unless</span> new
-<span id="L519" class="LineNr">519 </span>  *new <span class="Special">&lt;-</span> put *new, <span class="Constant"><a href='065duplex_list.mu.html#L36'>prev</a>:offset</span>, <a href='065duplex_list.mu.html#L522'>last</a>
-<span id="L520" class="LineNr">520 </span>]
-<span id="L521" class="LineNr">521 </span>
-<span id="L522" class="LineNr">522 </span><span class="muRecipe">def</span> <a href='065duplex_list.mu.html#L522'>last</a> in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem<span class="muRecipe"> -&gt; </span>result:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
-<span id="L523" class="LineNr">523 </span>  <span class="Constant">local-scope</span>
-<span id="L524" class="LineNr">524 </span>  <span class="Constant">load-ingredients</span>
-<span id="L525" class="LineNr">525 </span>  result <span class="Special">&lt;-</span> copy in
-<span id="L526" class="LineNr">526 </span>  <span class="Delimiter">{</span>
-<span id="L527" class="LineNr">527 </span>  <span class="Conceal">¦</span> <a href='065duplex_list.mu.html#L29'>next</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> result
-<span id="L528" class="LineNr">528 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L29'>next</a>
-<span id="L529" class="LineNr">529 </span>  <span class="Conceal">¦</span> result <span class="Special">&lt;-</span> copy <a href='065duplex_list.mu.html#L29'>next</a>
-<span id="L530" class="LineNr">530 </span>  <span class="Conceal">¦</span> <span class="muControl">loop</span>
-<span id="L531" class="LineNr">531 </span>  <span class="Delimiter">}</span>
-<span id="L532" class="LineNr">532 </span>]
-<span id="L533" class="LineNr">533 </span>
-<span id="L534" class="LineNr">534 </span><span class="Comment"># helper for debugging</span>
-<span id="L535" class="LineNr">535 </span><span class="muRecipe">def</span> <a href='065duplex_list.mu.html#L535'>dump-from</a> x:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
+<span id="L519" class="LineNr">519 </span>  len:num <span class="Special">&lt;-</span> length *new
+<span id="L520" class="LineNr">520 </span>  <span class="muControl">return-unless</span> len
+<span id="L521" class="LineNr">521 </span>  curr:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> copy in
+<span id="L522" class="LineNr">522 </span>  idx:num <span class="Special">&lt;-</span> copy<span class="Constant"> 0</span>
+<span id="L523" class="LineNr">523 </span>  <span class="Delimiter">{</span>
+<span id="L524" class="LineNr">524 </span>  <span class="Conceal">¦</span> done?:bool <span class="Special">&lt;-</span> greater-or-equal idx, len
+<span id="L525" class="LineNr">525 </span>  <span class="Conceal">¦</span> <span class="muControl">break-if</span> done?
+<span id="L526" class="LineNr">526 </span>  <span class="Conceal">¦</span> c:_elem <span class="Special">&lt;-</span> index *new, idx
+<span id="L527" class="LineNr">527 </span>  <span class="Conceal">¦</span> insert c, curr
+<span id="L528" class="LineNr">528 </span>  <span class="Conceal">¦</span> <span class="Comment"># next iter</span>
+<span id="L529" class="LineNr">529 </span>  <span class="Conceal">¦</span> curr <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> curr
+<span id="L530" class="LineNr">530 </span>  <span class="Conceal">¦</span> idx <span class="Special">&lt;-</span> add idx,<span class="Constant"> 1</span>
+<span id="L531" class="LineNr">531 </span>  <span class="Conceal">¦</span> <span class="muControl">loop</span>
+<span id="L532" class="LineNr">532 </span>  <span class="Delimiter">}</span>
+<span id="L533" class="LineNr">533 </span>]
+<span id="L534" class="LineNr">534 </span>
+<span id="L535" class="LineNr">535 </span><span class="muRecipe">def</span> append in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem, new:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem/contained-in:in<span class="muRecipe"> -&gt; </span>in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
 <span id="L536" class="LineNr">536 </span>  <span class="Constant">local-scope</span>
 <span id="L537" class="LineNr">537 </span>  <span class="Constant">load-ingredients</span>
-<span id="L538" class="LineNr">538 </span>  $print x, <span class="Constant">[: ]</span>
-<span id="L539" class="LineNr">539 </span>  <span class="Delimiter">{</span>
-<span id="L540" class="LineNr">540 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> x
-<span id="L541" class="LineNr">541 </span>  <span class="Conceal">¦</span> c:_elem <span class="Special">&lt;-</span> get *x, <span class="Constant">value:offset</span>
-<span id="L542" class="LineNr">542 </span>  <span class="Conceal">¦</span> $print c, <span class="Constant">[ ]</span>
-<span id="L543" class="LineNr">543 </span>  <span class="Conceal">¦</span> x <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> x
-<span id="L544" class="LineNr">544 </span>  <span class="Conceal">¦</span> <span class="Delimiter">{</span>
-<span id="L545" class="LineNr">545 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> is-newline?:bool <span class="Special">&lt;-</span> equal c, <span class="Constant">10/newline</span>
-<span id="L546" class="LineNr">546 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-newline?
-<span id="L547" class="LineNr">547 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print <span class="Constant">10/newline</span>
-<span id="L548" class="LineNr">548 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print x, <span class="Constant">[: ]</span>
-<span id="L549" class="LineNr">549 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
-<span id="L550" class="LineNr">550 </span>  <span class="Conceal">¦</span> <span class="muControl">loop</span>
-<span id="L551" class="LineNr">551 </span>  <span class="Delimiter">}</span>
-<span id="L552" class="LineNr">552 </span>  $print <span class="Constant">10/newline</span>, <span class="Constant">[---]</span>, <span class="Constant">10/newline</span>
-<span id="L553" class="LineNr">553 </span>]
+<span id="L538" class="LineNr">538 </span>  <a href='065duplex_list.mu.html#L544'>last</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L544'>last</a> in
+<span id="L539" class="LineNr">539 </span>  *last <span class="Special">&lt;-</span> put *last, <span class="Constant"><a href='065duplex_list.mu.html#L29'>next</a>:offset</span>, new
+<span id="L540" class="LineNr">540 </span>  <span class="muControl">return-unless</span> new
+<span id="L541" class="LineNr">541 </span>  *new <span class="Special">&lt;-</span> put *new, <span class="Constant"><a href='065duplex_list.mu.html#L36'>prev</a>:offset</span>, <a href='065duplex_list.mu.html#L544'>last</a>
+<span id="L542" class="LineNr">542 </span>]
+<span id="L543" class="LineNr">543 </span>
+<span id="L544" class="LineNr">544 </span><span class="muRecipe">def</span> <a href='065duplex_list.mu.html#L544'>last</a> in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem<span class="muRecipe"> -&gt; </span>result:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
+<span id="L545" class="LineNr">545 </span>  <span class="Constant">local-scope</span>
+<span id="L546" class="LineNr">546 </span>  <span class="Constant">load-ingredients</span>
+<span id="L547" class="LineNr">547 </span>  result <span class="Special">&lt;-</span> copy in
+<span id="L548" class="LineNr">548 </span>  <span class="Delimiter">{</span>
+<span id="L549" class="LineNr">549 </span>  <span class="Conceal">¦</span> <a href='065duplex_list.mu.html#L29'>next</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> result
+<span id="L550" class="LineNr">550 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L29'>next</a>
+<span id="L551" class="LineNr">551 </span>  <span class="Conceal">¦</span> result <span class="Special">&lt;-</span> copy <a href='065duplex_list.mu.html#L29'>next</a>
+<span id="L552" class="LineNr">552 </span>  <span class="Conceal">¦</span> <span class="muControl">loop</span>
+<span id="L553" class="LineNr">553 </span>  <span class="Delimiter">}</span>
+<span id="L554" class="LineNr">554 </span>]
+<span id="L555" class="LineNr">555 </span>
+<span id="L556" class="LineNr">556 </span><span class="Comment"># helper for debugging</span>
+<span id="L557" class="LineNr">557 </span><span class="muRecipe">def</span> <a href='065duplex_list.mu.html#L557'>dump-from</a> x:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem [
+<span id="L558" class="LineNr">558 </span>  <span class="Constant">local-scope</span>
+<span id="L559" class="LineNr">559 </span>  <span class="Constant">load-ingredients</span>
+<span id="L560" class="LineNr">560 </span>  $print x, <span class="Constant">[: ]</span>
+<span id="L561" class="LineNr">561 </span>  <span class="Delimiter">{</span>
+<span id="L562" class="LineNr">562 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> x
+<span id="L563" class="LineNr">563 </span>  <span class="Conceal">¦</span> c:_elem <span class="Special">&lt;-</span> get *x, <span class="Constant">value:offset</span>
+<span id="L564" class="LineNr">564 </span>  <span class="Conceal">¦</span> $print c, <span class="Constant">[ ]</span>
+<span id="L565" class="LineNr">565 </span>  <span class="Conceal">¦</span> x <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> x
+<span id="L566" class="LineNr">566 </span>  <span class="Conceal">¦</span> <span class="Delimiter">{</span>
+<span id="L567" class="LineNr">567 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> is-newline?:bool <span class="Special">&lt;-</span> equal c, <span class="Constant">10/newline</span>
+<span id="L568" class="LineNr">568 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-newline?
+<span id="L569" class="LineNr">569 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print <span class="Constant">10/newline</span>
+<span id="L570" class="LineNr">570 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print x, <span class="Constant">[: ]</span>
+<span id="L571" class="LineNr">571 </span>  <span class="Conceal">¦</span> <span class="Delimiter">}</span>
+<span id="L572" class="LineNr">572 </span>  <span class="Conceal">¦</span> <span class="muControl">loop</span>
+<span id="L573" class="LineNr">573 </span>  <span class="Delimiter">}</span>
+<span id="L574" class="LineNr">574 </span>  $print <span class="Constant">10/newline</span>, <span class="Constant">[---]</span>, <span class="Constant">10/newline</span>
+<span id="L575" class="LineNr">575 </span>]
+<span id="L576" class="LineNr">576 </span>
+<span id="L577" class="LineNr">577 </span><span class="muScenario">scenario</span> stash-duplex-list [
+<span id="L578" class="LineNr">578 </span>  <span class="Constant">local-scope</span>
+<span id="L579" class="LineNr">579 </span>  <a href='064list.mu.html#L6'>list</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:num <span class="Special">&lt;-</span> push<span class="Constant"> 1</span>,<span class="Constant"> 0</span>
+<span id="L580" class="LineNr">580 </span>  <a href='064list.mu.html#L6'>list</a> <span class="Special">&lt;-</span> push<span class="Constant"> 2</span>, <a href='064list.mu.html#L6'>list</a>
+<span id="L581" class="LineNr">581 </span>  <a href='064list.mu.html#L6'>list</a> <span class="Special">&lt;-</span> push<span class="Constant"> 3</span>, <a href='064list.mu.html#L6'>list</a>
+<span id="L582" class="LineNr">582 </span>  run [
+<span id="L583" class="LineNr">583 </span>  <span class="Conceal">¦</span> stash <span class="Constant">[list:]</span>, <a href='064list.mu.html#L6'>list</a>
+<span id="L584" class="LineNr">584 </span>  ]
+<span id="L585" class="LineNr">585 </span>  trace-should-contain [
+<span id="L586" class="LineNr">586 </span>  <span class="Conceal">¦</span> app: <a href='064list.mu.html#L6'>list</a>:<span class="Constant"> 3</span> <span class="Special">&lt;-</span>&gt;<span class="Constant"> 2</span> <span class="Special">&lt;-</span>&gt;<span class="Constant"> 1</span>
+<span id="L587" class="LineNr">587 </span>  ]
+<span id="L588" class="LineNr">588 </span>]
+<span id="L589" class="LineNr">589 </span>
+<span id="L590" class="LineNr">590 </span><span class="muRecipe">def</span> to-text in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem<span class="muRecipe"> -&gt; </span>result:text [
+<span id="L591" class="LineNr">591 </span>  <span class="Constant">local-scope</span>
+<span id="L592" class="LineNr">592 </span>  <span class="Constant">load-ingredients</span>
+<span id="L593" class="LineNr">593 </span>  buf:&amp;:<a href='061text.mu.html#L126'>buffer</a>:char <span class="Special">&lt;-</span> <a href='061text.mu.html#L131'>new-buffer</a><span class="Constant"> 80</span>
+<span id="L594" class="LineNr">594 </span>  buf <span class="Special">&lt;-</span> to-buffer in, buf
+<span id="L595" class="LineNr">595 </span>  result <span class="Special">&lt;-</span> <a href='061text.mu.html#L353'>buffer-to-array</a> buf
+<span id="L596" class="LineNr">596 </span>]
+<span id="L597" class="LineNr">597 </span>
+<span id="L598" class="LineNr">598 </span><span class="Comment"># variant of 'to-text' which stops printing after a few elements (and so is robust to cycles)</span>
+<span id="L599" class="LineNr">599 </span><span class="muRecipe">def</span> to-text-line in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem<span class="muRecipe"> -&gt; </span>result:text [
+<span id="L600" class="LineNr">600 </span>  <span class="Constant">local-scope</span>
+<span id="L601" class="LineNr">601 </span>  <span class="Constant">load-ingredients</span>
+<span id="L602" class="LineNr">602 </span>  buf:&amp;:<a href='061text.mu.html#L126'>buffer</a>:char <span class="Special">&lt;-</span> <a href='061text.mu.html#L131'>new-buffer</a><span class="Constant"> 80</span>
+<span id="L603" class="LineNr">603 </span>  buf <span class="Special">&lt;-</span> to-buffer in, buf,<span class="Constant"> 6</span>  <span class="Comment"># max elements to display</span>
+<span id="L604" class="LineNr">604 </span>  result <span class="Special">&lt;-</span> <a href='061text.mu.html#L353'>buffer-to-array</a> buf
+<span id="L605" class="LineNr">605 </span>]
+<span id="L606" class="LineNr">606 </span>
+<span id="L607" class="LineNr">607 </span><span class="muRecipe">def</span> to-buffer in:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem, buf:&amp;:<a href='061text.mu.html#L126'>buffer</a>:char<span class="muRecipe"> -&gt; </span>buf:&amp;:<a href='061text.mu.html#L126'>buffer</a>:char [
+<span id="L608" class="LineNr">608 </span>  <span class="Constant">local-scope</span>
+<span id="L609" class="LineNr">609 </span>  <span class="Constant">load-ingredients</span>
+<span id="L610" class="LineNr">610 </span>  <span class="Delimiter">{</span>
+<span id="L611" class="LineNr">611 </span>  <span class="Conceal">¦</span> <span class="muControl">break-if</span> in
+<span id="L612" class="LineNr">612 </span>  <span class="Conceal">¦</span> buf <span class="Special">&lt;-</span> append buf, <span class="Constant">[[]</span>]
+<span id="L613" class="LineNr">613 </span>  <span class="Conceal">¦</span> <span class="muControl">return</span>
+<span id="L614" class="LineNr">614 </span>  <span class="Delimiter">}</span>
+<span id="L615" class="LineNr">615 </span>  <span class="Comment"># append in.value to buf</span>
+<span id="L616" class="LineNr">616 </span>  val:_elem <span class="Special">&lt;-</span> get *in, <span class="Constant">value:offset</span>
+<span id="L617" class="LineNr">617 </span>  buf <span class="Special">&lt;-</span> append buf, val
+<span id="L618" class="LineNr">618 </span>  <span class="Comment"># now prepare next</span>
+<span id="L619" class="LineNr">619 </span>  <a href='065duplex_list.mu.html#L29'>next</a>:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special">&lt;-</span> <a href='065duplex_list.mu.html#L29'>next</a> in
+<span id="L620" class="LineNr">620 </span>  nextn:num <span class="Special">&lt;-</span> copy <a href='065duplex_list.mu.html#L29'>next</a>
+<span id="L621" class="LineNr">621 </span>  <span class="muControl">return-unless</span> <a href='065duplex_list.mu.html#L29'>next</a>
+<span id="L622" class="LineNr">622 </span>  buf <span class="Special">&lt;-</span> append buf, <span class="Constant">[ &lt;-&gt; ]</span>
+<span id="L623" class="LineNr">623 </span>  <span class="Comment"># and recurse</span>
+<span id="L624" class="LineNr">624 </span>  remaining:num, optional-ingredient-found?:bool <span class="Special">&lt;-</span> <span class="Constant">next-ingredient</span>
+<span id="L625" class="LineNr">625 </span>  <span class="Delimiter">{</span>
+<span id="L626" class="LineNr">626 </span>  <span class="Conceal">¦</span> <span class="muControl">break-if</span> optional-ingredient-found?
+<span id="L627" class="LineNr">627 </span>  <span class="Conceal">¦</span> <span class="Comment"># unlimited recursion</span>
+<span id="L628" class="LineNr">628 </span>  <span class="Conceal">¦</span> buf <span class="Special">&lt;-</span> to-buffer <a href='065duplex_list.mu.html#L29'>next</a>, buf
+<span id="L629" class="LineNr">629 </span>  <span class="Conceal">¦</span> <span class="muControl">return</span>
+<span id="L630" class="LineNr">630 </span>  <span class="Delimiter">}</span>
+<span id="L631" class="LineNr">631 </span>  <span class="Delimiter">{</span>
+<span id="L632" class="LineNr">632 </span>  <span class="Conceal">¦</span> <span class="muControl">break-unless</span> remaining
+<span id="L633" class="LineNr">633 </span>  <span class="Conceal">¦</span> <span class="Comment"># limited recursion</span>
+<span id="L634" class="LineNr">634 </span>  <span class="Conceal">¦</span> remaining <span class="Special">&lt;-</span> subtract remaining,<span class="Constant"> 1</span>
+<span id="L635" class="LineNr">635 </span>  <span class="Conceal">¦</span> buf <span class="Special">&lt;-</span> to-buffer <a href='065duplex_list.mu.html#L29'>next</a>, buf, remaining
+<span id="L636" class="LineNr">636 </span>  <span class="Conceal">¦</span> <span class="muControl">return</span>
+<span id="L637" class="LineNr">637 </span>  <span class="Delimiter">}</span>
+<span id="L638" class="LineNr">638 </span>  <span class="Comment"># past recursion depth; insert ellipses and stop</span>
+<span id="L639" class="LineNr">639 </span>  append buf, <span class="Constant">[...]</span>
+<span id="L640" class="LineNr">640 </span>]
+<span id="L641" class="LineNr">641 </span>
+<span id="L642" class="LineNr">642 </span><span class="muScenario">scenario</span> stash-empty-duplex-list [
+<span id="L643" class="LineNr">643 </span>  <span class="Constant">local-scope</span>
+<span id="L644" class="LineNr">644 </span>  x:&amp;:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:num <span class="Special">&lt;-</span> copy<span class="Constant"> 0</span>
+<span id="L645" class="LineNr">645 </span>  run [
+<span id="L646" class="LineNr">646 </span>  <span class="Conceal">¦</span> stash x
+<span id="L647" class="LineNr">647 </span>  ]
+<span id="L648" class="LineNr">648 </span>  trace-should-contain [
+<span id="L649" class="LineNr">649 </span>  <span class="Conceal">¦</span> app: <span class="Constant">[]</span>
+<span id="L650" class="LineNr">650 </span>  ]
+<span id="L651" class="LineNr">651 </span>]
 </pre>
 </body>
 </html>