<snapdata remixID="9163023"><project name="U5L1-Algorithms Page 2" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAARxUlEQVR4Xu2dB1QWxxbHLzVqjA0xiqhgr7GLHTsqsYXE9qJH8/DEJL7EWKPmJbYYRSNooubFyjPPaE7sBmMXK2IXK9jFit0oBgXf+Y/Out/u97EfC4Hx7NxzPBzkm5079/52Zu7Mnflcnj179oykSAvkkAVcJIA5ZHlZLbOABFCCkKMWkADmqPll5RJAyUCOWkACmKPml5VLACUDOWoBCWCOml9WbhfARYsWUePGjXPMOjt27KCePXsq9XN9XFxcCMuWIvzcvn27jY45ZqxXvGIdgBEREdSlSxfTjr59+zYVKlSIRo4cSYmJiRQZGcmAmTNnDoWGhjr93OXLl9PAgQNp2rRp6erD6+Ng7t27l+rWrUu9evWipKQkWrt2Lasfz/nss8+crt8Z0FesWMGeKcW8BXQAHjhwgAEEB/Tr14/S0tJoy5YtFBQURMnJyRQdHU29e/emGzdu0Lp162jbtm104cIF8vf3p6VLl1JISAhVr16dPv74Ywbg9evX6dixY1SjRg0CVGzx8UVPxtW29zvAqlWrFh06dIgKFizIPhocHExHjx6l2bNns7quXr3K6kPdpUuXZtC3atWKPvroI+rWrRsDEPqjTP/+/WnEiBHmLWWn5J07d1i7pJi3gA7AM2fOKIBMmDCBYmNj6c0332SOLFq0KHl4eLB/tWvXZhAMHz6ccuXKRU2bNqX9+/cTetAZM2bQJ598wgC8du0aDRo0iKZPn07oMZzpWTiQZcqUofPnzyuta9++PQ0ePJg9a/78+TRr1iyqUqUKtWvXjipWrEhr1qyhzZs3M9C6du1KN2/epKdPn7Iy6H3PnTtn3lIOSvr5+WX5M630QB2Ap0+fFmKOBVDLli3LoBFhzufoxZEAZu510QGYkJDAngiDlyzmTWPa+lHZQh6Zq8WZ0i4u1Hn+ScLQy+svX748nT17VgHQx7tg9uljT2cXF3onMp7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ORzQAmgefhQUngA+UF1OPzS9z0ztROCBiMXMPnoLvIsWdFwOw5RsBo+QIgeEDpxAHF7gxTzFhAeQHyTJSCwByCu6EVCaEa24vK16Mas5UwU7B15Run51D0gBxA3O+DCJinmLSA8gLieo3PnzgzAxBnvU4eQ7vSg8UCHLc7KIXiyVwc27HL4eA/Ib47AXjSuMpFi3gLCA4imjR49mnD2AvfLOPP1qKd7+FHaQ/M35bt45qJyv12xa1Vk30CQFQ29pGTOAq8EgJlroiwtsgUkgCJ7xwK6SQAt4GSRmygBFNk7FtBNAmgBJ4vcRAmgyN6xgG4SQAs4WeQmSgBF9o4FdJMAWsDJIjdRAiiydyygmwTQAk4WuYkSQJG9YwHdJIAWcLLITZQAiuwdC+gmAbSAk0VuogRQZO9YQDcJoAWcLHITJYAie8cCukkALeBkkZsoARTZOxbQTQJoASeL3EQJoMjesYBuEkALOFnkJkoARfaOBXSTAFrAySI3UQIosncsoJsE0AJOFrmJEkCRvWMB3SSAFnCyyE2UAIrsHQvoJgG0gJNFbqIEUGTvWEA3CaAFnCxyEyWAInvHArpJAC3gZJGbKAEU2TsW0E0CaAEni9xECaDI3rGAbhJACzhZ5CZKAEX2jgV0kwBawMkiN1ECKLJ3LKCbBNACTha5iRJAkb1jAd0kgBZwsshNlACK7B0L6CYBtICTRW6iBFBk71hANwmgBZwschMlgCJ7xwK6SQAt4GSRmygBFNk7FtBNAmgBJ4vcRAmgyN6xgG4SQAs4WeQm/h+hKjhNTM/SHQAAAABJRU5ErkJggg==</thumbnail><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="false" codify="true" inheritance="true" sublistIDs="false" scheduled="true" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQIC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gEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><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="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><script x="202" y="451"><custom-block s="position of number %n in unsorted list %l"><block s="reportRandom"><l>1</l><l>100</l></block><block var="unsorted list"/></custom-block></script><script x="307" y="288"><custom-block s="position of number %n in sorted list %l"><l>321</l><block var="sorted list"/></custom-block></script><script x="691.000002" y="263.83333833333336"><block s="doSetVar"><l>unsorted list</l><custom-block s="Generate list of Length %n Low %n High %n"><l>25</l><l>1</l><l>100</l></custom-block></block></script><script x="292" y="550"><block s="doWarp"><script><block s="doSetVar"><l>sorted list</l><custom-block s="Generate sorted list length %n range low %n high %n"><l>500</l><l>4</l><l>8</l></custom-block></block></script></block></script><script x="666" y="404"><block s="reportMappedCode"><block s="reifyReporter"><script><block s="doFor"><l>i</l><l>1</l><l>10</l><script><block s="doIfElse"><block s="reportEquals"><block var="i"/><l>5</l></block><script><block s="doReport"><l>5</l></block></script><script><block s="doReport"><block var="i"/></block></script></block></script></block></script><list></list></block></block></script></scripts></sprite><watcher var="unsorted list" style="normal" x="12" y="23" color="243,118,29" extX="80" extY="70"/><watcher var="sorted list" style="normal" x="120" y="22.999998000000005" color="243,118,29" extX="95" extY="150"/></sprites></stage><hidden></hidden><headers><doSetVar></doSetVar></headers><code><list></list><doSetVar>&lt;#n&gt; = &lt;#n&gt;;</doSetVar><string>&lt;#1&gt;</string><doDeleteAttr>h1</doDeleteAttr><doChangeVar>&lt;#1&gt; += &lt;#2&gt;;</doChangeVar><doFor>for (&lt;#1&gt; = &lt;#2&gt;; &lt;#1&gt; &lt; &lt;#3&gt;; &lt;#1&gt;++) {&#xD;&lt;#4&gt;&#xD;}</doFor><doIf>if (&lt;#1&gt;) {&#xD;&lt;#2&gt;&#xD;}</doIf><doReport>return &lt;#1&gt;;</doReport><reportSum>&lt;#1&gt; + &lt;#2&gt;</reportSum><reportDifference>&lt;#1&gt; - &lt;#2&gt;</reportDifference><boolTrue>True</boolTrue><boolFalse>False</boolFalse><reportProduct>&lt;#1&gt; * &lt;#2&gt;</reportProduct><reportQuotient>&lt;#1&gt; / &lt;#2&gt;</reportQuotient><reportPower>&lt;#1&gt; ** &lt;#2&gt;</reportPower><reportModulus>&lt;#1&gt; % &lt;#2&gt;</reportModulus><reportRound>Math.round(&lt;#1&gt;)</reportRound><reportLessThan>&lt;#1&gt; &lt; &lt;#2&gt;</reportLessThan><reportEquals>&lt;#1&gt; == &lt;#2&gt;</reportEquals><reportOr>&lt;#1&gt; || &lt;#2&gt;</reportOr><reportGreaterThan>&lt;#1&gt; &gt; &lt;#2&gt;</reportGreaterThan><reportAnd>&lt;#1&gt; &amp;&amp; &lt;#2&gt;</reportAnd><reportNot>!&lt;#1&gt;</reportNot><reportListLength>&lt;#1&gt;.length</reportListLength><reportListItem>&lt;#2&gt;[&lt;#1&gt;]</reportListItem><reportNewList>[&lt;#1&gt;,&lt;#2&gt;,&lt;#3&gt;]</reportNewList><reportMappedCode></reportMappedCode><doIfElse>if (&lt;#1&gt;) {&#xD;&lt;#2&gt;&#xD;} else {&#xD;&lt;#3&gt;&#xD;}</doIfElse><reportIfElse>&lt;#1&gt; ? &lt;#2&gt; : &lt;#3&gt;</reportIfElse><true>true</true><doForever>while (true) {&#xD;&lt;#1&gt;&#xD;}</doForever><doDeleteFromList>&lt;#2&gt;.splice(&lt;#1&gt;, 1)</doDeleteFromList><doReplaceInList>&lt;#2&gt;.splice(&lt;#1&gt;, 1, &lt;#3&gt;)</doReplaceInList><item></item></code><blocks><block-definition s="position of number %&apos;number&apos; in unsorted list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><custom-block s="%upvar for each %upvar of %l %ca"><l>#</l><l>item</l><block var="list"/><script><block s="doIf"><block s="reportEquals"><block var="item"/><block var="number"/></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="number"/><l> is at position </l><block var="#"/><l> of the list.</l></list></block></block></script></block></script></custom-block><block s="doReport"><l>Could not find number</l></block></script><scripts><script x="10" y="186.99999999999994"><block s="doDeclareVariables"><list><l>#</l></list><comment w="90" collapsed="false">Script for replacement of not importing blocks.</comment></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>#</l><l>1</l></block></script></block></script></scripts></block-definition><block-definition s="append %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="287" collapsed="false">Take any number of input lists, and create a new list&#xD;containing the items of the input lists.  So&#xD;APPEND [A B] [C D]&#xD;where the [...] are lists reports the list&#xD;[A B C D]&#xD;not [[A B] [C D]].</comment><header></header><code></code><translations>ca:concatena _&#xD;</translations><inputs><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="lists"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportListLength"><block var="lists"/></block><l>1</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="lists"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="lists"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><custom-block s="append %mult%l"><block s="reportCDR"><block var="lists"/></block></custom-block></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="lists"/></block></block><custom-block s="append %mult%l"><block s="reportCONS"><block s="reportCDR"><block s="reportListItem"><l>1</l><block var="lists"/></block></block><block s="reportCDR"><block var="lists"/></block></block></custom-block></block></block></script></block></script></block-definition><block-definition s="reverse %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="223" collapsed="false">Reports a new list containing the items of the input list, but in the opposite order.</comment><header></header><code></code><translations>ca:capgira _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>helper</l></list></block><block s="doSetVar"><l>helper</l><block s="reifyScript"><script><block s="doIf"><block s="reportEquals"><block var="input"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="result"/></block></script></block><block s="doReport"><block s="evaluate"><block var="helper"/><list><block s="reportCDR"><block var="input"/></block><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="input"/></block><block var="result"/></block></list></block></block></script><list><l>input</l><l>result</l></list></block></block><block s="doWarp"><script><block s="doReport"><block s="evaluate"><block var="helper"/><list><block var="data"/><block s="reportNewList"><list></list></block></list></block></block></script></block></script></block-definition><block-definition s="remove duplicates from %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="209" collapsed="false">Reports a new list whose items are the same as in the input list, except that if two or more equal items appear in the input list, only the last one is kept in the result.</comment><header></header><code></code><translations>ca:elimina els duplicats de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportCDR"><block var="data"/></block><block s="reportListItem"><l>1</l><block var="data"/></block></block><script><block s="doReport"><custom-block s="remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block></script></block></script></block-definition><block-definition s="sort %&apos;data&apos; ordering with %&apos;function&apos;" type="reporter" category="lists"><comment x="0" y="0" w="161.14285714285708" collapsed="false">Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot.  For a list of numbers, using &lt; as the comparison function will sort from low to high; using &gt; will sort from high to low.</comment><header></header><code></code><translations>ca:ordena _ segons criteri _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doDeclareVariables"><list><l>even items</l><l>odd items</l><l>merge</l><l>split</l><l>copy of data</l><l>id</l></list></block><block s="doSetVar"><l>id</l><block s="reifyScript"><script><block s="doReport"><l></l></block></script><list></list></block></block><block s="doSetVar"><l>copy of data</l><block s="reportMap"><block var="id"/><block var="data"/></block></block><block s="doSetVar"><l>split</l><block s="reifyScript"><script><block s="doSetVar"><l>even items</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>odd items</l><block s="reportNewList"><list></list></block></block><block s="doUntil"><block s="reportListIsEmpty"><block var="copy of data"/></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="odd items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block><block s="doIf"><block s="reportNot"><block s="reportListIsEmpty"><block var="copy of data"/></block></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="even items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block></script></block></script></block></script><list></list></block></block><block s="doSetVar"><l>merge</l><block s="reifyScript"><script><block s="doIf"><block s="reportEquals"><block var="#1"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#2"/></block></script></block><block s="doIf"><block s="reportEquals"><block var="#2"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#1"/></block></script></block><block s="doIfElse"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="reportListItem"><l>1</l><block var="#2"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="evaluate"><block var="merge"/><list><block s="reportCDR"><block var="#1"/></block><block var="#2"/></list></block></block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#2"/></block><block s="evaluate"><block var="merge"/><list><block var="#1"/><block s="reportCDR"><block var="#2"/></block></list></block></block></block></script></block></script><list><l>#1</l><l>#2</l></list></block></block><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doRun"><block var="split"/><list></list></block><block s="doReport"><block s="evaluate"><block var="merge"/><list><custom-block s="sort %l ordering with %predRing"><block var="odd items"/><block var="function"/></custom-block><custom-block s="sort %l ordering with %predRing"><block var="even items"/><block var="function"/></custom-block></list></block></block></script></block-definition><block-definition s="assoc %&apos;key&apos; %&apos;a-list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="289.3333333333333" collapsed="false">The second input is an &quot;association list,&quot; a list of two-item lists.  Each of those smaller lists has a &quot;key&quot; as its first item and a &quot;value&quot; as its second.  ASSOC reports the first key-value pair in the association list whose key matches the first input.</comment><header></header><code></code><translations>ca:associació _ _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="a-list"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></script></block><block s="doReport"><custom-block s="assoc %s %l"><block var="key"/><block s="reportCDR"><block var="a-list"/></block></custom-block></block></script></block-definition><block-definition s="%&apos;#&apos; map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="225.00000000000003" collapsed="false">This block applies the given function to each item of the given list, like the primitive MAP block, but with two differences:&#xD;&#xD;1.  The # variable provided will contain the item number of the item currently being used in the given function: 1 for item 1, and so on.  You read the variable in your function; don&apos;t set it.&#xD;&#xD;2.  You can provide more than one input list.  If so, the lengths of all the lists should be the same, and the function you supply must expect as many inputs as you have lists (i.e., that many empty input slots in the function).</comment><header></header><code></code><translations>ca:_ mapeja _ sobre _&#xD;</translations><inputs><input type="%upvar"></input><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><list><l>data</l><l>count</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="data lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="%upvar map %repRing over %mult%l"><l>#</l><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="%upvar map %repRing over %mult%l"><l>#</l><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><list><l>data lists</l><l>count</l></list></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportCDR"><block var="lists"/></block></block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block><l>1</l></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/><l>1</l></list></block></block></script></block></script></block></script></block-definition><block-definition s="%&apos;#&apos; keep items %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="217.1428571428572" collapsed="false">This block makes a new list containing selected items from the given list, like the primitive KEEP block.&#xD;&#xD;What&apos;s different is that it provides the # variable for use in your predicate function.  It will contain the item number (in the original list) of the item being examined by the predicate.</comment><header></header><code></code><translations>ca:_ manté els elements on _ de _&#xD;</translations><inputs><input type="%upvar"></input><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>keep-helper</l></list></block><block s="doSetVar"><l>keep-helper</l><block s="reifyScript"><script><block s="doWarp"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="evaluate"><block var="keep-helper"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><script><block s="doReport"><block s="evaluate"><block var="keep-helper"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></script></block></script></block></script><list><l>data</l><l>count</l></list></block></block><block s="doReport"><block s="evaluate"><block var="keep-helper"/><list><block var="data"/><l>1</l></list></block></block></script></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><comment x="0" y="0" w="228.57142857142858" collapsed="false">This block carries out the given script for each item of the given list, like the primitive FOR EACH.&#xD;&#xD;What&apos;s different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.</comment><header></header><code></code><translations>ca:_ per cada _ de _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%ca"></input></inputs><script><block s="doSetVar"><l>#</l><l>1</l></block><block s="doUntil"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doChangeVar"><l>#</l><l>1</l></block></script></block></script></block-definition><block-definition s="%&apos;head&apos; in front of stream %&apos;tail&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a prefixação de _ ao canal _&#xD;</translations><inputs><input type="%s"></input><input type="%anyUE"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="head"/><block var="tail"/><block s="reportBoolean"><l><bool>false</bool></l></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="head of stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o primeiro item do canal _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="stream"/></block></block></script></block-definition><block-definition s="tail of stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com todos os itens de _ menos o primeiro&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportListItem"><l>3</l><block var="stream"/></block><script><block s="doReport"><block s="reportListItem"><l>4</l><block var="stream"/></block></block></script></block><block s="doReplaceInList"><l>4</l><block var="stream"/><block s="evaluate"><block s="reportListItem"><l>2</l><block var="stream"/></block><list></list></block></block><block s="doReplaceInList"><l>3</l><block var="stream"/><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="doReport"><block s="reportListItem"><l>4</l><block var="stream"/></block></block></script></block></script></block-definition><block-definition s="map %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a aplicação de _ aos itens dos canais _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="stream"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="head of stream %l"><l/></custom-block></autolambda><list></list></block><list><block var="stream"/></list></custom-block></block><custom-block s="map %repRing over stream %mult%l"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="tail of stream %l"><l/></custom-block></autolambda><list></list></block><list><block var="stream"/></list></custom-block></custom-block></custom-block></block></script></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:os itens tais que _ do canal _&#xD;</translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="stream"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="keep items such that %predRing from stream %l"><block var="pred"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></custom-block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from stream %l"><block var="pred"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a aplicação de _ aos itens de _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="data lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportCDR"><block var="lists"/></block></block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations>pt:o canal _ está vazio&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="show stream %&apos;stream&apos; %&apos;number&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:uma lista com os itens do canal _ até ao _ º&#xD;</translations><inputs><input type="%l"></input><input type="%n">10</input></inputs><script><block s="doIf"><custom-block s="empty? %l"><block var="stream"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>0</l></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="show stream %l %n"><custom-block s="tail of stream %l"><block var="stream"/></custom-block><block s="reportDifference"><block var="number"/><l>1</l></block></custom-block></block></block></script></block-definition><block-definition s="stream %&apos;items&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com _&#xD;</translations><inputs><input type="%mult%s"></input></inputs><script><block s="doIf"><custom-block s="empty? %l"><block var="items"/></custom-block><script><block s="doReport"><block var="items"/></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="reportListItem"><l>1</l><block var="items"/></block><custom-block s="stream %mult%s"><block s="reportCDR"><block var="items"/></block></custom-block></custom-block></block></script></block-definition><block-definition s="sieve %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a crivagem do canal _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="sieve %l"><custom-block s="keep items such that %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><block s="reportModulus"><l></l><custom-block s="head of stream %l"><block var="stream"/></custom-block></block><l>0</l></block></autolambda><list></list></block><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></custom-block></custom-block></block></script></block></script></block-definition><block-definition s="stream with numbers from %&apos;o inicio&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com os números a partir de _&#xD;</translations><inputs><input type="%n">1</input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="o inicio"/><block s="reifyReporter"><autolambda><custom-block s="stream with numbers from %n"><block s="reportSum"><block var="o inicio"/><l>1</l></block></custom-block></autolambda><list></list></block><block s="reportBoolean"><l><bool>false</bool></l></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="Generate list of Length %&apos;length&apos; Low %&apos;low&apos; High %&apos;high&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n">2</input><input type="%n">1</input><input type="%n">25</input></inputs><script><block s="doDeclareVariables"><list><l>list</l></list></block><block s="doSetVar"><l>list</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block var="length"/><script><block s="doAddToList"><block s="reportRandom"><block var="low"/><block var="high"/></block><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="position of number %&apos;number&apos; in sorted list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>low</l><l>high</l><l>current guess</l><l>previous guess</l></list></block><block s="doSetVar"><l>low</l><l>0</l></block><block s="doSetVar"><l>high</l><block s="reportListLength"><block var="list"/></block></block><block s="doSetVar"><l>current guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportListLength"><block var="list"/></block><l>2</l></block></block></block><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><block var="current guess"/><block var="list"/></block><block var="number"/></block><script><block s="doIf"><block s="reportGreaterThan"><block s="reportListItem"><block var="current guess"/><block var="list"/></block><block var="number"/></block><script><block s="doSetVar"><l>high</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block><block s="doSetVar"><l>current guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block></script></block><block s="doIf"><block s="reportLessThan"><block s="reportListItem"><block var="current guess"/><block var="list"/></block><block var="number"/></block><script><block s="doSetVar"><l>low</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block><block s="doSetVar"><l>current guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="current guess"/><block var="previous guess"/></block><script><block s="doReport"><l>Number not in list!</l></block></script></block><block s="doSetVar"><l>previous guess</l><block var="current guess"/></block></script></block><block s="doReport"><block var="current guess"/></block></script></block-definition><block-definition s="Generate sorted list length %&apos;length&apos; range low %&apos;low&apos; high %&apos;high&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>list</l><l>current number</l></list></block><block s="doSetVar"><l>list</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>current number</l><l>0</l></block><block s="doRepeat"><block var="length"/><script><block s="doChangeVar"><l>current number</l><block s="reportRandom"><block var="low"/><block var="high"/></block></block><block s="doAddToList"><block var="current number"/><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; ordering with %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:$flash sortiere _ nach _&#xD;pt:$flash uma ordenação de _ com critério _&#xD;ca:$flash ordena _ segons criteri _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicSort(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="$flash reverse %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:$flash umgekehrt _&#xD;pt:$flash uma lista inversa de _&#xD;ca:$flash capgira _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>list</l></list><l>return new List(list.asArray().slice().reverse());</l></block><list><block var="list"/></list></block></block></script></block-definition><block-definition s="setting %&apos;which&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:o valor da configuração _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Project notes&#xD;Project name&#xD;User&#xD;Presentation mode&#xD;Language&#xD;Zoom blocks&#xD;Stage size&#xD;Stage scale&#xD;Retina display support&#xD;Long form input dialog&#xD;Plain prototype labels&#xD;Input sliders&#xD;Execute on slider change&#xD;Clicking sound&#xD;Turbo mode&#xD;Flat design&#xD;Keyboard editing&#xD;Visible stepping&#xD;Thread safe scripts&#xD;Prefer smooth animations&#xD;Flat line ends&#xD;Codification support&#xD;Inheritance support&#xD;Visible palette</options></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>which</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    ide = stage.parentThatIsA(IDE_Morph),&#xD;    world = stage.parentThatIsA(WorldMorph);&#xD;&#xD;switch (which) {&#xD;    case &apos;Project notes&apos;:&#xD;        return ide.projectNotes;&#xD;    case &apos;Project name&apos;:&#xD;        return ide.projectName;&#xD;    case &apos;User&apos;:&#xD;        return ide.cloud.username;&#xD;    case &apos;Presentation mode&apos;:&#xD;        return ide.isAppMode;&#xD;    case &apos;Language&apos;:&#xD;        return SnapTranslator.language;&#xD;    case &apos;Zoom blocks&apos;:&#xD;        return SyntaxElementMorph.prototype.scale;&#xD;    case &apos;Stage size&apos;:&#xD;        return new List([StageMorph.prototype.dimensions.x,&#xD;                                   StageMorph.prototype.dimensions.y]);&#xD;    case &apos;Stage scale&apos;:&#xD;       return stage.scale;&#xD;    case &apos;Retina display support&apos;:&#xD;        return isRetinaEnabled();&#xD;    case &apos;Long form input dialog&apos;:&#xD;        return InputSlotDialogMorph.prototype.isLaunchingExpanded;&#xD;    case &apos;Plain prototype labels&apos;:&#xD;        return BlockLabelPlaceHolderMorph.prototype.plainLabel;&#xD;    case &apos;Input sliders&apos;:&#xD;        return MorphicPreferences.useSliderForInput;&#xD;    case &apos;Execute on slider change&apos;:&#xD;        return ArgMorph.prototype.executeOnSliderEdit;&#xD;    case &apos;Clicking sound&apos;:&#xD;        return !!BlockMorph.prototype.snapSound;&#xD;    case &apos;Turbo mode&apos;:&#xD;        return stage.isFastTracked;&#xD;    case &apos;Flat design&apos;:&#xD;        return MorphicPreferences.isFlat;&#xD;    case &apos;Keyboard editing&apos;:&#xD;        return world.keyboardReceiver instanceof ScriptFocusMorph;&#xD;    case &apos;Visible stepping&apos;:&#xD;        return Process.prototype.enableSingleStepping;&#xD;    case &apos;Thread safe scripts&apos;:&#xD;        return stage.isThreadSafe;&#xD;    case &apos;Prefer smooth animations&apos;:&#xD;        return StageMorph.prototype.frameRate &gt; 0;&#xD;    case &apos;Flat line ends&apos;:&#xD;        return SpriteMorph.prototype.useFlatLineEnds;&#xD;    case &apos;Codification support&apos;:&#xD;        return StageMorph.prototype.enableCodeMapping;&#xD;    case &apos;Inheritance support&apos;:&#xD;        return StageMorph.prototype.enableInheritance;&#xD;    default: return which;&#xD;    case &apos;Visible palette&apos;:&#xD;        return ide.currentCategory;&#xD;}</l></block><list><block var="which"/></list></block></block></script></block-definition><block-definition s="set flag %&apos;which&apos; to %&apos;tf&apos;" type="command" category="sensing"><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Presentation mode&#xD;Retina display support&#xD;Long form input dialog&#xD;Plain prototype labels&#xD;Input sliders&#xD;Execute on slider change&#xD;Clicking sound&#xD;Turbo mode&#xD;Flat design&#xD;Keyboard editing&#xD;Visible stepping&#xD;Thread safe scripts&#xD;Prefer smooth animations&#xD;Flat line ends&#xD;Codification support&#xD;Inheritance support</options></input><input type="%b"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>which</l><l>tf</l></list><l>var   stage = this.parentThatIsA(StageMorph),&#xD;        ide = stage.parentThatIsA(IDE_Morph),&#xD;        world = stage.parentThatIsA(WorldMorph),&#xD;        thisObj = this;&#xD;&#xD;if (tf != !!tf) return;&#xD;&#xD;try{&#xD;ide.savingPreferences = false;&#xD;&#xD;switch (which) {&#xD;    case &apos;Presentation mode&apos;:&#xD;        if (tf != ide.isAppMode) ide.toggleAppMode();&#xD;        break;&#xD;    case &apos;Retina display support&apos;:&#xD;        if (tf != isRetinaEnabled()) ide.toggleRetina();&#xD;        break;&#xD;    case &apos;Long form input dialog&apos;:&#xD;        if (tf != InputSlotDialogMorph.prototype.isLaunchingExpanded)&#xD;            ide.toggleLongFormInputDialog();&#xD;        break;&#xD;    case &apos;Plain prototype labels&apos;:&#xD;        if (tf != BlockLabelPlaceHolderMorph.prototype.plainLabel)&#xD;            ide.togglePlainPrototypeLabels();&#xD;        break;&#xD;    case &apos;Input sliders&apos;:&#xD;        MorphicPreferences.useSliderForInput = tf;&#xD;        break;&#xD;    case &apos;Execute on slider change&apos;:&#xD;        ArgMorph.prototype.executeOnSliderEdit = tf;&#xD;        break;&#xD;    case &apos;Clicking sound&apos;:&#xD;        if (tf != !!BlockMorph.prototype.snapSound)&#xD;            BlockMorph.prototype.toggleSnapSound();&#xD;        break;&#xD;    case &apos;Turbo mode&apos;:&#xD;        if (tf != stage.isFastTracked)&#xD;            ide.toggleFastTracking();&#xD;        break;&#xD;    case &apos;Flat design&apos;:&#xD;        if (tf == MorphicPreferences.isFlat) break;&#xD;        if (tf)&#xD;            ide.flatDesign();&#xD;        else&#xD;            ide.defaultDesign();&#xD;        break;&#xD;    case &apos;Keyboard editing&apos;:&#xD;        if (tf != (world.keyboardReceiver instanceof ScriptFocusMorph)) {&#xD;            thisObj.scripts.toggleKeyboardEntry();&#xD;        };&#xD;        break;&#xD;    case &apos;Visible stepping&apos;:&#xD;        if (tf != Process.prototype.enableSingleStepping)&#xD;            ide.toggleSingleStepping();&#xD;        break;&#xD;    case &apos;Thread safe scripts&apos;:&#xD;        stage.isThreadSafe = tf;&#xD;        break;&#xD;    case &apos;Prefer smooth animations&apos;:&#xD;        if (tf != (StageMorph.prototype.frameRate &gt; 0))&#xD;            ide.toggleVariableFrameRate();&#xD;        break;&#xD;    case &apos;Flat line ends&apos;:&#xD;        SpriteMorph.prototype.useFlatLineEnds = tf;&#xD;        break;&#xD;    case &apos;Codification support&apos;:&#xD;        if (tf != StageMorph.prototype.enableCodeMapping) {&#xD;            StageMorph.prototype.enableCodeMapping = tf;&#xD;            ide.currentSprite.blocksCache.variables = null;&#xD;            ide.currentSprite.paletteCache.variables = null;&#xD;            ide.refreshPalette();&#xD;        }&#xD;        break;&#xD;    case &apos;Inheritance support&apos;:&#xD;        if (tf != StageMorph.prototype.enableInheritance) {&#xD;            StageMorph.prototype.enableInheritance = tf;&#xD;            ide.currentSprite.blocksCache.variables = null;&#xD;            ide.currentSprite.paletteCache.variables = null;&#xD;            ide.refreshPalette();&#xD;        }&#xD;        break;&#xD;};&#xD;}&#xD;finally {&#xD;ide.savingPreferences = false;&#xD;};&#xD;</l></block><list><block var="which"/><block var="tf"/></list></block></script></block-definition><block-definition s="set value %&apos;which&apos; to %&apos;value&apos;" type="command" category="sensing"><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Project notes&#xD;Project name&#xD;Language&#xD;Zoom blocks&#xD;Stage size&#xD;Stage scale&#xD;Visible palette</options></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>which</l><l>value</l></list><l>var   stage = this.parentThatIsA(StageMorph),&#xD;        ide = stage.parentThatIsA(IDE_Morph),&#xD;        world = stage.parentThatIsA(WorldMorph);&#xD;&#xD;try {&#xD;ide.savingPreferences = false;&#xD;&#xD;switch (which) {&#xD;    case &apos;Project notes&apos;:&#xD;        ide.projectNotes = value;&#xD;        break;&#xD;    case &apos;Project name&apos;:&#xD;        ide.setProjectName(value);&#xD;        break;&#xD;    case &apos;Language&apos;:&#xD;        ide.setLanguage(value);&#xD;        break;&#xD;    case &apos;Zoom blocks&apos;:&#xD;        if (!isNaN(value)) ide.setBlocksScale(Math.min(value, 12));&#xD;        break;&#xD;    case &apos;Stage size&apos;:&#xD;        if ((value instanceof List) &amp;&amp; value.length()==2&#xD;                       &amp;&amp; !isNaN(value.at(1)) &amp;&amp; !isNaN(value.at(2)))&#xD;            ide.setStageExtent(new Point(value.at(1), value.at(2)));&#xD;        break;&#xD;    case &apos;Stage scale&apos;:&#xD;        ide.toggleStageSize(value != 1, Math.max(0.1, value));&#xD;        break;&#xD;    case &apos;Visible palette&apos;:&#xD;        ide.currentCategory = value.toLowerCase();&#xD;        ide.categories.children.forEach(function (each) {&#xD;                each.refresh();&#xD;        });&#xD;        ide.refreshPalette(true);&#xD;        break;&#xD;};&#xD;}&#xD;finally {ide.savingPreferences = true;&#xD;};</l></block><list><block var="which"/><block var="value"/></list></block></script></block-definition><block-definition s="USE BIGNUMS %&apos;bool&apos;" type="command" category="operators"><comment x="0" y="0" w="303.3333333333333" collapsed="false">call with True to turn on the entire Scheme numeric tower, including infinite-precision integers, exact rationals, and complex numbers; call with False to restore native JavaScript arithmetic.</comment><header></header><code></code><translations>pt:altera utilização de aritmética do Scheme para _&#xD;</translations><inputs><input type="%b"></input></inputs><script><block s="doDeclareVariables"><list><l>isDone</l></list></block><block s="doSetVar"><l>isDone</l><block s="evaluate"><block s="reportJSFunction"><list><l>useBigNums</l></list><l>var done = false;&#xD;&#xD;function initialize (callback) {&#xD;    var bigScript = document.createElement(&apos;script&apos;);&#xD;    bigScript.src = &apos;//snap.berkeley.edu/snapsource/libraries/biginteger.js&apos;;&#xD;    bigScript.onload = loadScheme;&#xD;    document.head.appendChild(bigScript);&#xD;&#xD;    function loadScheme () {&#xD;        var schemeScript = document.createElement(&apos;script&apos;);&#xD;        schemeScript.src = &apos;//snap.berkeley.edu/snapsource/libraries/schemeNumber.js&apos;;&#xD;        schemeScript.onload = finish;&#xD;        document.head.appendChild(schemeScript);&#xD;    }&#xD;&#xD;    function finish () {&#xD;        makeGlobalObject();&#xD;        callback();&#xD;    }&#xD;}&#xD;&#xD;function makeGlobalObject () {&#xD;    window.bigNumbers = {&#xD;        originalEvaluate: InputSlotMorph.prototype.evaluate,&#xD;        originalChangeVar: VariableFrame.prototype.changeVar,&#xD;        originalPrims: {&#xD;            reportSum: Process.prototype.reportSum,&#xD;            reportDifference: Process.prototype.reportDifference,&#xD;            reportProduct: Process.prototype.reportProduct,&#xD;            reportQuotient: Process.prototype.reportQuotient,&#xD;            reportPower: Process.prototype.reportPower,&#xD;            reportModulus: Process.prototype.reportModulus,&#xD;            reportRandom: Process.prototype.reportRandom,&#xD;            reportLessThan: Process.prototype.reportLessThan,&#xD;            reportGreaterThan: Process.prototype.reportGreaterThan,&#xD;            reportEquals: Process.prototype.reportEquals,&#xD;            reportIsIdentical: Process.prototype.reportIsIdentical,&#xD;            reportMonadic: Process.prototype.reportMonadic&#xD;        }&#xD;    };&#xD;}&#xD;&#xD;function loadBlocks () {&#xD;    var fn = SchemeNumber.fn;&#xD;    var originalPrims = window.bigNumbers.originalPrims;&#xD;    if (useBigNums) {&#xD;        InputSlotMorph.prototype.evaluate = function () {&#xD;            var contents = this.contents();&#xD;            if (this.constant) {&#xD;                return this.constant;&#xD;            }&#xD;            if (this.isNumeric) {&#xD;                return parseNumber(contents.text || &apos;0&apos;);&#xD;            }&#xD;            return contents.text;&#xD;        };&#xD;        VariableFrame.prototype.changeVar = function (name, delta, sender) {&#xD;            var frame = this.find(name),&#xD;                value,&#xD;                newValue;&#xD;            if (frame) {&#xD;                value = parseNumber(frame.vars[name].value);&#xD;                newValue = value !== value ? delta : value + parseNumber(delta);&#xD;                if (sender instanceof SpriteMorph &amp;&amp;&#xD;                        (frame.owner instanceof SpriteMorph) &amp;&amp;&#xD;                        (sender !== frame.owner)) {&#xD;                    sender.shadowVar(name, newValue);&#xD;                } else {&#xD;                    frame.vars[name].value = newValue;&#xD;                }&#xD;&#xD;            }&#xD;        };&#xD;        Object.assign(Process.prototype, {&#xD;            reportSum: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;+&apos;](a, b);&#xD;            },&#xD;            reportDifference: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;-&apos;](a, b);&#xD;            },&#xD;            reportProduct: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;*&apos;](a, b);&#xD;            },&#xD;            reportQuotient: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (fn[&apos;=&apos;](b, &apos;0&apos;) &amp;&amp; !fn[&apos;=&apos;](a, &apos;0&apos;)) {&#xD;                      return (fn[&apos;&lt;&apos;](a, &apos;0&apos;) ? SchemeNumber(&apos;-inf.0&apos;) : SchemeNumber(&apos;+inf.0&apos;))&#xD;                };&#xD;                if (a !== a || b !== b || fn[&apos;=&apos;](b, &apos;0&apos;)) return SchemeNumber(&apos;+nan.0&apos;);&#xD;                return fn[&apos;/&apos;](a, b);&#xD;            },&#xD;            reportPower: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;expt&apos;](a, b);&#xD;            },&#xD;            reportModulus: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                var result = fn.mod(a, b);&#xD;                if (fn[&apos;&lt;&apos;](b, &apos;0&apos;) &amp;&amp; fn[&apos;&gt;&apos;](result, &apos;0&apos;)) {&#xD;                    result = fn[&apos;+&apos;](result, b);&#xD;                }&#xD;                return result;&#xD;            },&#xD;            reportRandom: function (min, max) {&#xD;                var floor = parseNumber(min),&#xD;                    ceil = parseNumber(max);&#xD;                if (floor !== floor || ceil !== ceil) return NaN;&#xD;                if (!fn[&apos;=&apos;](fn.mod(floor, &apos;1&apos;), &apos;0&apos;) || !fn[&apos;=&apos;](fn.mod(ceil, &apos;1&apos;), &apos;0&apos;)) {&#xD;                    // One of the numbers isn&apos;t whole. Include the decimal.&#xD;                    return fn[&apos;+&apos;](&#xD;                        fn[&apos;*&apos;](&#xD;                            Math.random(),&#xD;                            fn[&apos;-&apos;](ceil, floor)&#xD;                        ),&#xD;                        floor&#xD;                    );&#xD;                }&#xD;                return fn.floor(&#xD;                    fn[&apos;+&apos;](&#xD;                        fn[&apos;*&apos;](&#xD;                            Math.random(),&#xD;                            fn[&apos;+&apos;](&#xD;                                fn[&apos;-&apos;](ceil, floor),&#xD;                                &apos;1&apos;&#xD;                            )&#xD;                        ),&#xD;                        floor&#xD;                    )&#xD;                );&#xD;            },&#xD;            reportLessThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&lt;&apos;](a, b);&#xD;            },&#xD;            reportGreaterThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&gt;&apos;](a, b);&#xD;            },&#xD;            reportGreaterThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&gt;&apos;](a, b);&#xD;            },&#xD;            reportEqual: function (a, b) {&#xD;                x = parseNumber(a);&#xD;                y = parseNumber(b);&#xD;                if (x !== x || y !== y) return snapEquals(a, b);&#xD;                return fn[&apos;=&apos;](x, y);&#xD;            },&#xD;            reportIsIdentical: function (a, b) {&#xD;                x = parseNumber(a);&#xD;                y = parseNumber(b);&#xD;                if (x !== x || y !== y) return originalPrims.reportIsIdentical(a, b);&#xD;                return fn[&apos;=&apos;](x, y);&#xD;            },&#xD;            reportMonadic: function (fname, n) {&#xD;                n = parseNumber(n);&#xD;                if (n !== n) return NaN;&#xD;&#xD;                switch (Process.prototype.inputOption(fname)) {&#xD;                case &apos;abs&apos;:&#xD;                    return fn.abs(n);&#xD;                case &apos;ceiling&apos;:&#xD;                    return fn.ceiling(n);&#xD;                case &apos;floor&apos;:&#xD;                    return fn.floor(n);&#xD;                case &apos;sqrt&apos;:&#xD;                    return sqrt(n);&#xD;                case &apos;sin&apos;:&#xD;                    return fn.sin(radians(n));&#xD;                case &apos;cos&apos;:&#xD;                    return fn.cos(radians(n));&#xD;                case &apos;tan&apos;:&#xD;                    return fn.tan(radians(n));&#xD;                case &apos;asin&apos;:&#xD;                    return degrees(fn.asin(n));&#xD;                case &apos;acos&apos;:&#xD;                    return degrees(fn.acos(n));&#xD;                case &apos;atan&apos;:&#xD;                    return degrees(fn.atan(n));&#xD;                case &apos;ln&apos;:&#xD;                    return fn.log(n);&#xD;                case &apos;log&apos;:&#xD;                    return fn.log(n, &apos;10&apos;);&#xD;                case &apos;e^&apos;:&#xD;                    return fn.exp(n);&#xD;                case &apos;10^&apos;:&#xD;                    return fn.expt(&apos;10&apos;, n);&#xD;                default:&#xD;                    return SchemeNumber(&apos;0&apos;);&#xD;                }&#xD;            }&#xD;        });&#xD;    } else {&#xD;        InputSlotMorph.prototype.evaluate = window.bigNumbers.originalEvaluate;&#xD;        VariableFrame.prototype.changeVar = window.bigNumbers.originalChangeVar;&#xD;        Object.assign(Process.prototype, originalPrims);&#xD;    }&#xD;    done = true;&#xD;}&#xD;&#xD;function parseNumber (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;    if (!fn[&apos;number?&apos;](n)) {&#xD;        n = &apos;&apos; + n;&#xD;        try {&#xD;            return parseENotation(n) || SchemeNumber(n);&#xD;        } catch (err) {&#xD;            return NaN;&#xD;        }&#xD;    }&#xD;    return n;&#xD;}&#xD;&#xD;function parseENotation (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    var numbers = n.match(/^(-?\d+\.?\d*|-?\.\d+)e(-?\d+)$/i);&#xD;    if (!numbers) return null;&#xD;&#xD;    var coefficient = numbers[1];&#xD;    var exponent = numbers[2];&#xD;    return fn[&apos;*&apos;](&#xD;        coefficient,&#xD;        fn.expt(&apos;10&apos;, exponent)&#xD;    );&#xD;}&#xD;&#xD;function sqrt (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    if (!fn[&apos;exact?&apos;](n) || !fn[&apos;rational?&apos;](n) || fn[&apos;&lt;&apos;](n,&apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    var rootNumerator = fn[&apos;exact-integer-sqrt&apos;](fn.numerator(n));&#xD;    if (!fn[&apos;=&apos;](rootNumerator[1], &apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    var rootDenominator = fn[&apos;exact-integer-sqrt&apos;](fn.denominator(n));&#xD;    if (!fn[&apos;=&apos;](rootDenominator[1], &apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    return fn[&apos;/&apos;](rootNumerator[0], rootDenominator[0]);&#xD;}&#xD;&#xD;function isDone () {&#xD;    return done;&#xD;}&#xD;&#xD;if (window.bigNumbers) {&#xD;    loadBlocks();&#xD;} else {&#xD;    initialize(loadBlocks);&#xD;}&#xD;&#xD;return isDone;</l></block><list><block var="bool"/></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="isDone"/><list></list></block></block></script></block-definition><block-definition s="%&apos;n&apos; !" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block var="n"/><l>0</l></block><l>1</l><block s="reportProduct"><block var="n"/><custom-block s="%n !"><block s="reportDifference"><block var="n"/><l>1</l></block></custom-block></block></block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="Scheme number %&apos;function&apos; of %&apos;number&apos;" type="reporter" category="operators"><comment x="0" y="0" w="300" collapsed="true">Provides Scheme arithmetic functions not in JavaScript</comment><header></header><code></code><translations>pt:_ de _&#xD;</translations><inputs><input type="%s" readonly="true"><options>number?&#xD;complex?&#xD;real?&#xD;rational?&#xD;integer?&#xD;exact?&#xD;inexact?&#xD;exact&#xD;inexact&#xD;finite?&#xD;infinite?&#xD;nan?&#xD;numerator&#xD;denominator&#xD;real-part&#xD;imag-part&#xD;magnitude&#xD;angle</options></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>which</l><l>num</l></list><l>function parseNumber (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;    if (!fn[&apos;number?&apos;](n)) {&#xD;        n = &apos;&apos; + n;&#xD;        try {&#xD;            return parseENotation(n) || SchemeNumber(n);&#xD;        } catch (err) {&#xD;            return NaN;&#xD;        }&#xD;    }&#xD;    return n;&#xD;}&#xD;&#xD;function parseENotation (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    var numbers = n.match(/^(-?\d+\.?\d*|-?\.\d+)e(-?\d+)$/i);&#xD;    if (!numbers) return null;&#xD;&#xD;    var coefficient = numbers[1];&#xD;    var exponent = numbers[2];&#xD;    return fn[&apos;*&apos;](&#xD;        coefficient,&#xD;        fn.expt(&apos;10&apos;, exponent)&#xD;    );&#xD;}&#xD;var fn=SchemeNumber.fn,&#xD;      number=parseNumber(num);&#xD;&#xD;switch (which) {&#xD;  case &apos;number?&apos;:&#xD;  case &apos;complex?&apos;:&#xD;    return (fn[&apos;number?&apos;](number));&#xD;  case &apos;real?&apos;:&#xD;    return (fn[&apos;real?&apos;](number) || fn[&apos;real-valued?&apos;](number));&#xD;  case &apos;rational?&apos;:&#xD;    return (fn[&apos;rational?&apos;](number) || (fn[&apos;=&apos;](number, fn.rationalize(number, parseNumber(&apos;1.0e-5&apos;)))));&#xD;  case &apos;integer?&apos;:&#xD;    return (fn[&apos;integer?&apos;](number) || fn[&apos;integer-valued?&apos;](number));&#xD;  case &apos;exact?&apos;:&#xD;  case &apos;inexact?&apos;:&#xD;  case &apos;finite?&apos;:&#xD;  case &apos;infinite?&apos;:&#xD;  case &apos;nan?&apos;:&#xD;  case &apos;real-part&apos;:&#xD;  case &apos;imag-part&apos;:&#xD;    return (fn[which](number));&#xD;  case &apos;magnitude&apos;:&#xD;    return (fn.magnitude(number));&#xD;  case &apos;angle&apos;:&#xD;    return (fn.angle(number));&#xD;  case &apos;numerator&apos;:&#xD;    return (fn.numerator(number));&#xD;  case &apos;denominator&apos;:&#xD;    return (fn.denominator(number));&#xD;  case &apos;exact&apos;:&#xD;    return (fn.exact(number));&#xD;case &apos;inexact&apos;:&#xD;    return (fn.inexact(number));&#xD;}</l></block><list><block var="function"/><block var="number"/></list></block></block></script></block-definition></blocks><variables><variable name="unsorted list"><list struct="atomic" id="1579">34,30,35,58,35,44,94,55,49,45,28,86,29,13,69,13,88,45,20,94,35,9,9,83,71</list></variable><variable name="sorted list"><list struct="atomic" id="1580">4,11,19,26,30,36,40,46,52,56,60,68,76,83,89,96,101,107,115,121,128,133,138,145,151,155,161,169,174,179,185,189,197,204,212,217,221,227,235,239,247,254,262,269,276,281,289,297,302,310,317,324,332,338,343,350,354,361,367,373,377,383,391,399,403,408,413,420,428,432,438,444,450,454,458,462,466,474,481,486,491,498,506,510,514,521,525,530,537,542,546,553,561,567,574,579,587,592,600,606,611,615,621,627,635,640,647,652,658,664,672,679,683,689,697,703,707,711,719,723,727,733,741,747,754,762,769,775,779,783,789,796,803,810,817,825,831,835,843,848,855,859,865,872,879,884,890,894,901,906,910,914,918,922,926,930,938,942,946,954,961,968,974,982,987,995,1002,1009,1016,1021,1025,1033,1037,1044,1052,1057,1064,1070,1076,1082,1087,1093,1100,1104,1109,1117,1123,1131,1135,1141,1149,1157,1165,1172,1176,1182,1189,1193,1199,1207,1212,1217,1222,1227,1231,1235,1240,1247,1255,1262,1268,1276,1283,1288,1295,1299,1304,1310,1314,1318,1323,1327,1332,1338,1344,1352,1359,1366,1370,1376,1383,1389,1395,1403,1409,1414,1420,1426,1433,1437,1444,1448,1455,1460,1464,1470,1478,1486,1491,1495,1502,1507,1511,1518,1524,1530,1534,1542,1548,1553,1560,1564,1570,1574,1581,1586,1593,1598,1605,1613,1617,1623,1628,1636,1644,1649,1657,1663,1670,1675,1681,1686,1690,1697,1702,1706,1714,1719,1726,1733,1741,1748,1753,1757,1763,1771,1778,1786,1790,1794,1801,1808,1815,1823,1829,1834,1839,1847,1853,1858,1865,1873,1877,1885,1892,1897,1901,1907,1911,1916,1922,1926,1934,1940,1947,1954,1959,1965,1969,1974,1982,1987,1991,1997,2003,2008,2013,2017,2021,2028,2034,2040,2047,2055,2062,2066,2070,2077,2085,2090,2097,2105,2109,2114,2122,2130,2136,2144,2152,2160,2165,2172,2177,2183,2189,2197,2203,2207,2214,2218,2225,2233,2239,2246,2254,2261,2268,2275,2282,2287,2295,2300,2306,2310,2314,2318,2326,2333,2338,2342,2347,2354,2358,2365,2372,2376,2383,2389,2393,2398,2404,2409,2414,2421,2429,2435,2439,2446,2452,2460,2465,2470,2475,2482,2488,2492,2498,2504,2508,2514,2522,2530,2537,2545,2553,2558,2566,2570,2574,2581,2587,2594,2602,2606,2613,2619,2625,2632,2638,2642,2648,2655,2663,2670,2678,2686,2690,2694,2702,2707,2713,2717,2721,2725,2733,2740,2748,2755,2761,2769,2773,2780,2786,2794,2799,2806,2813,2820,2825,2829,2835,2841,2846,2853,2859,2867,2873,2881,2888,2893,2899,2903,2907,2911,2915,2919,2926,2932,2937,2944,2951,2956,2964,2972,2979,2986,2992,2997,3003,3011</list></variable></variables></project><media name="U5L1-Algorithms Page 2" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>