<snapdata remixID="11130935"><project name="hashtables" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACzUlEQVR4nO3dv0pbYRiAcS+ikClj0MFciQ5JO3ZqL6Lg0FtwdQ0EJE0hRQUzeIbi9NHhYMESdMjggc5ChgSCvJ0iSc2/Qfpo+vzgHb+T94MHDsmSrZBAW/QC+r8ZoFBzA+z3+3F6evpsk2VZ3N/f/+u76RV4EmCr1Yrb29uV0/n8Pr6+exNf3i6f3vdvj2cODw+JO+oFmwnw5uYmrq+v15r0oRSDT+W1ZvqcNG0mwOPj48jzPPI8j0qlEicnJ1Eul+Pi4iJKpVJUKpXodruR53n8+Dgb4MPvXxERcwOcPDPP8xgOh8hF9TLNBHh2dhYppUgpRaPRiIODgxiNRtFsNqPVakWj0Yirq6tIKT0JMMajeCh+zg1w8syUUozHY+queoFmAhwMBnF5ebnW/B3gspk+J0178iXk6OgosixbOXd3d2t9QK/XiyzL4vz8PIqiePYL6HXzd0ChDFAoAxTKAIUyQKEMUCgDFMoAhTJAoQxQKAMUygCFMkChDFAoAxTKAIUyQKEMUCgDFMoAhTJAoQxQKAMUygCFMkChDFAoAxTKAIUyQKEMUCgDFMoAhTJAoQxQKAMUygCFMkChDFAoAxTKAIUyQKEMUCgDFMoAhTJAoQxQKAMUygAX2NnZiXa7Ta+x8QxwiXq9HrVaLWq1Wuzu7q79J91anwGuMAlweur1euzv79OrbQQDXGFRgHt7e/RqG8EAl5h+BVer1SiKgl5p4xjgAtvb29HpdOg1Np4BCmWAQhmgUAYolAEKZYBCGaBQBiiUAQplgEIZoFAGKJQBCmWAQhmgUAYolAEKZYBCGaBQBiiUAQplgEIZoFAGKJQBCmWAQhmgUAYolAEKZYBCGaBQBiiUAQplgEIZoFAGKJQBCmWAQhmgUAYolAEKZYBCGaBQBiiUAQplgEIZoFAGKJQBCmWAQhmgUAYolAEKZYBCGaBQBiiUAQr1B7ZaDfRd1LV6AAAAAElFTkSuQmCC</thumbnail><scenes select="1"><scene name="hashtables"><notes></notes><palette><category name="Hashtables" color="201,0,22,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="empty hashtable" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>https://space-elephant.github.io/snap-extensions/hashtable.js</l></list></block><block s="doReport"><block s="reportApplyExtension"><l>hsh_new()</l><list></list></block></block></script></block-definition><block-definition s="value at %&apos;key&apos; of %&apos;table&apos;" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>hsh_get(hashtable, key)</l><list><block var="table"/><block var="key"/></list></block></block></script></block-definition><block-definition s="replace value at %&apos;key&apos; of %&apos;table&apos; with %&apos;value&apos;" type="command" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>hsh_set(hashtable, key, value)</l><list><block var="table"/><block var="key"/><block var="value"/></list></block></script></block-definition><block-definition s="remove value at %&apos;key&apos; of %&apos;table&apos;" type="command" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doApplyExtension"><l>hsh_remove(hashtable, key)</l><list><block var="table"/><block var="key"/></list></block></script></block-definition><block-definition s="clear %&apos;table&apos;" type="command" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doApplyExtension"><l>hsh_clear(hashtable)</l><list><block var="table"/></list></block></script></block-definition><block-definition s="%&apos;table&apos; contains %&apos;key&apos;" type="predicate" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>hsh_contains(hashtable, key)</l><list><block var="table"/><block var="key"/></list></block></block></script></block-definition><block-definition s="keys of %&apos;table&apos;" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>hsh_keys(hashtable)</l><list><block var="table"/></list></block></block></script></block-definition><block-definition s="number of pairs in %&apos;table&apos;" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>length</option></l><custom-block s="keys of %l"><block var="table"/></custom-block></block></block></script></block-definition><block-definition s="for each %&apos;key&apos; in %&apos;table&apos; %&apos;action&apos;" type="command" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%ca"></input></inputs><script><block s="doForEach"><l>item</l><custom-block s="keys of %l"><block var="table"/></custom-block><script><block s="doSetVar"><l>key</l><block var="item"/></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="{ %&apos;key&apos; : %&apos;value&apos; }" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><custom-block s="empty hashtable"></custom-block></block><custom-block s="replace value at %s of %l with %s"><block var="key"/><block var="result"/><block var="value"/></custom-block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="add pairs from %&apos;1&apos; to %&apos;2&apos;" type="command" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><custom-block s="for each %upvar in %l %ca"><l>key</l><block var="1"/><script><custom-block s="replace value at %s of %l with %s"><block var="key"/><block var="2"/><custom-block s="value at %s of %l"><block var="key"/><block var="1"/></custom-block></custom-block></script></custom-block></script></block-definition><block-definition s="union of %&apos;tables&apos;" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><custom-block s="empty hashtable"></custom-block></block><block s="doForEach"><l>table</l><block var="tables"/><script><custom-block s="add pairs from %l to %l"><block var="table"/><block var="result"/></custom-block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="display %&apos;table&apos;" type="reporter" category="Hashtables"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block s="reportNewList"><list><l>{</l></list></block></block><custom-block s="for each %upvar in %l %ca"><l>key</l><block var="table"/><script><block s="doAddToList"><block var="key"/><block var="result"/></block><block s="doAddToList"><l>: </l><block var="result"/></block><block s="doAddToList"><custom-block s="value at %s of %l"><block var="key"/><block var="table"/></custom-block><block var="result"/></block><block s="doAddToList"><l>, </l><block var="result"/></block></script></custom-block><block s="doReplaceInList"><l><option>last</option></l><block var="result"/><l>}</l></block><block s="doReport"><block s="reportJoinWords"><block var="result"/></block></block></script></block-definition></blocks><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="188"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAACtUlEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Bo3+AAF/RMkcAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="189"></list></costumes><sounds><list struct="atomic" id="190"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="195"><costumes><list struct="atomic" id="196"></list></costumes><sounds><list struct="atomic" id="197"></list></sounds><blocks></blocks><variables></variables><scripts><script x="194" y="284.16666666666686"><custom-block s="keys of %l"><block var="test"/></custom-block></script><script x="289" y="369.0000000000001"><custom-block s="display %s"><custom-block s="union of %mult%l"><list><custom-block s="{ %s : %s }"><l>a</l><l>b</l></custom-block><custom-block s="{ %s : %s }"><l>c</l><l>d</l></custom-block></list></custom-block></custom-block></script><script x="536" y="393.0000000000001"><block var="test"/></script><script x="281" y="114.83333333333314"><block s="doSetVar"><l>test</l><custom-block s="empty hashtable"></custom-block></block></script><script x="348" y="421"><custom-block s="{ %s : %s }"><l>a</l><l>b</l></custom-block></script><script x="395" y="205.16666666666708"><custom-block s="replace value at %s of %l with %s"><l>1</l><block var="test"/><l>2</l></custom-block></script></scripts></sprite><watcher var="test" style="normal" x="10" y="10" color="243,118,29"/></sprites></stage><variables><variable name="test"><l>0</l></variable></variables></scene></scenes></project><media name="hashtables" app="Snap! 7, https://snap.berkeley.edu" version="2"></media></snapdata>