about summary refs log tree commit diff stats
path: root/html/057immutable.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-09-25 21:20:49 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-09-25 21:20:49 -0700
commitc0d61295ed3575cfea7d2a22d81bae93c6009308 (patch)
tree42fc40d4ce6da540c9fa75d5e74ec75e5c313a7b /html/057immutable.cc.html
parent409237204368205a06e2b82fcab26b0a290d7412 (diff)
downloadmu-c0d61295ed3575cfea7d2a22d81bae93c6009308.tar.gz
4008
Allow list `push` operation to save result in a new list rather than
mutate the existing list.
Diffstat (limited to 'html/057immutable.cc.html')
-rw-r--r--html/057immutable.cc.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/html/057immutable.cc.html b/html/057immutable.cc.html
index bd08a8f2..50e9ad43 100644
--- a/html/057immutable.cc.html
+++ b/html/057immutable.cc.html
@@ -626,17 +626,30 @@ if ('onhashchange' in window) {
 <span id="L562" class="LineNr">562 </span>  <span class="Identifier">continue</span><span class="Delimiter">;</span>
 <span id="L563" class="LineNr">563 </span><span class="Delimiter">}</span>
 <span id="L564" class="LineNr">564 </span>
-<span id="L565" class="LineNr">565 </span><span class="Delimiter">:(scenario contained_in_check)</span>
+<span id="L565" class="LineNr">565 </span><span class="Delimiter">:(scenario contained_in_product)</span>
 <span id="L566" class="LineNr">566 </span><span class="muData">container</span> test-list [
 <span id="L567" class="LineNr">567 </span>  <span class="Normal">value</span>:num
 <span id="L568" class="LineNr">568 </span>  <span class="Normal">next</span>:&amp;:test-list
 <span id="L569" class="LineNr">569 </span>]
-<span id="L570" class="LineNr">570 </span><span class="muRecipe">def</span> test-remove x:&amp;:test-list/contained-in:result<span class="Delimiter">,</span> from:&amp;:test-list<span class="muRecipe"> -&gt; </span>result:&amp;:test-list [
+<span id="L570" class="LineNr">570 </span><span class="muRecipe">def</span> foo x:&amp;:test-list/contained-in:result<span class="muRecipe"> -&gt; </span>result:&amp;:test-list [
 <span id="L571" class="LineNr">571 </span>  local-scope
 <span id="L572" class="LineNr">572 </span>  load-ingredients
 <span id="L573" class="LineNr">573 </span>  result<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
 <span id="L574" class="LineNr">574 </span>]
 <span id="L575" class="LineNr">575 </span>$error: <span class="Constant">0</span>
+<span id="L576" class="LineNr">576 </span>
+<span id="L577" class="LineNr">577 </span><span class="Delimiter">:(scenario contained_in_is_mutable)</span>
+<span id="L578" class="LineNr">578 </span><span class="muData">container</span> test-list [
+<span id="L579" class="LineNr">579 </span>  <span class="Normal">value</span>:num
+<span id="L580" class="LineNr">580 </span>  <span class="Normal">next</span>:&amp;:test-list
+<span id="L581" class="LineNr">581 </span>]
+<span id="L582" class="LineNr">582 </span><span class="muRecipe">def</span> foo x:&amp;:test-list/contained-in:result<span class="muRecipe"> -&gt; </span>result:&amp;:test-list [
+<span id="L583" class="LineNr">583 </span>  local-scope
+<span id="L584" class="LineNr">584 </span>  load-ingredients
+<span id="L585" class="LineNr">585 </span>  result<span class="Special"> &lt;- </span>copy x
+<span id="L586" class="LineNr">586 </span>  <a href='001help.cc.html#L221'>put</a> *x<span class="Delimiter">,</span> <span class="Constant">value:offset</span><span class="Delimiter">,</span> <span class="Constant">34</span>
+<span id="L587" class="LineNr">587 </span>]
+<span id="L588" class="LineNr">588 </span>$error: <span class="Constant">0</span>
 </pre>
 </body>
 </html>