<snapdata remixID="11628126"><project name="abbriviations" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAnpJREFUeF7t17Fpw1AARdFv7WJN4EVcawrPJZeeR3u4kiGQkCYJaXxBHLUSPHT/AaHTvu/7cCkQFTgBGJU3+1EAQBDSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBAH/If7lcxu12G8uypAd09HEAfznh6/X6dXfbtnG/38f5fD66ibe+H4B/5P6O8PPRaZrG8/kcj8fjrYd1xDEAAUxdA/iPT/C6rmOe5/TAjjYOoJ+Q1DSAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmN/4C1wn8qIbHiI0AAAAASUVORK5CYII=</thumbnail><scenes select="1"><scene name="abbriviations"><notes></notes><palette><category name="Dictionaries" color="122,41,0,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="create %&apos;_scope&apos; var %&apos;_names&apos;" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates  new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in &apos;names&apos; list).&#xD;&#xD;If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _&#xD;ca:crea les _ variables _&#xD;es:crear las _ variables _&#xD;de:erstellen _ var _&#xD;</translations><inputs><input type="%s" readonly="true">global<options>global&#xD;sprite&#xD;script</options></input><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block var="_scope"/><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="delete var %&apos;_names&apos;" type="command" category="variables"><comment x="0" y="0" w="217" collapsed="false">This block deletes all the variables with the names given (inside input list).&#xD;&#xD;Each name will make only one variable deletion, and this will be the variable found following the scope order: &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;If we have a &quot;testing&quot; sprite variable and also a &quot;testing&quot; global one, deleting &quot;testing&quot; will delete only the sprite one (Yes! we can also do &quot;delete var (testing, testing)&quot; to delete both.&#xD;&#xD;If one variable does not exists (in any scope) an error happens, stopping block action in that point. You can check it before with the &quot;does var (name) exists?&quot;block. </comment><header></header><code></code><translations>pt:remove as variáveis _&#xD;ca:esborra les variables _&#xD;es:borrar variables _&#xD;de:löschen var _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>err_ignore</l><list><custom-block s="var %s"><block var="_item"/></custom-block></list></block><block s="doApplyExtension"><l>var_delete(name)</l><list><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="set var %&apos;_name&apos; to %&apos;_value&apos;" type="command" category="variables"><comment x="0" y="0" w="240.4931640625" collapsed="false">This block sets the given value (last input) to the variable named with the name givent (var input).&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>ca:assigna a _ el valor _&#xD;es:asignar a _ el valor _&#xD;pt:altera _ para _&#xD;de:setze var _ auf _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>var_set(name, val)</l><list><block var="_name"/><block var="_value"/></list></block></script></block-definition><block-definition s="var %&apos;_name&apos;" type="reporter" category="variables"><comment x="0" y="0" w="178.00000000000003" collapsed="false">This block reports the value of the variable with the name given.&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>pt:o valor de _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></block></script></block-definition><block-definition s="does var %&apos;_name&apos; exist?" type="predicate" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block reports &quot;true&quot; if there is a variable with this given name (input slot) in that context.&#xD;&#xD;It can be a global, sprite or script variable.&#xD;&#xD;Otherwise it reports &quot;false&quot;.</comment><header></header><code></code><translations>pt:a variável _ existe&#xD;ca:existeix la variable _ ?&#xD;es:existe la variable _ ?&#xD;de:existiert var _ ?&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doApplyExtension"><l>err_ignore</l><list><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="reifyScript"><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><l></l></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block></script></block-definition><block-definition s="show var %&apos;_name&apos;" type="command" category="variables"><comment x="0" y="0" w="181" collapsed="false">This block turns on (show) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input).&#xD;&#xD;It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;No errors if that variable does not exist.</comment><header></header><code></code><translations>ca:mostra la variable _&#xD;es:mostrar variable _&#xD;pt:mostra a variável _&#xD;de:zeige var _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doApplyExtension"><l>var_show(name)</l><list><block var="_name"/></list></block></script></block-definition><block-definition s="hide var %&apos;_name&apos;" type="command" category="variables"><comment x="0" y="0" w="181" collapsed="false">This block turns off (hide) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input).&#xD;&#xD;It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;No errors if that variable does not exist.</comment><header></header><code></code><translations>ca:amaga la variable _&#xD;es:esconder variable _&#xD;pt:esconde a variável _&#xD;de:verstecke var _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doApplyExtension"><l>var_hide(name)</l><list><block var="_name"/></list></block></script></block-definition><block-definition s="abbriviate %&apos;word&apos; as %&apos;abb&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>abbreviations</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>abbreviations</l></list></custom-block><custom-block s="set var %s to %s"><l>abbreviations</l><custom-block s="dictionary %mult%s %mult%s"><list></list><list></list></custom-block></custom-block></script></block><custom-block s="set %s of %l to %s"><block var="word"/><custom-block s="var %s"><l>abbreviations</l></custom-block><block var="abb"/></custom-block><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>unabbreviations</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>unabbreviations</l></list></custom-block><custom-block s="set var %s to %s"><l>unabbreviations</l><custom-block s="dictionary %mult%s %mult%s"><list></list><list></list></custom-block></custom-block></script></block><custom-block s="set %s of %l to %s"><block var="abb"/><custom-block s="var %s"><l>unabbreviations</l></custom-block><block var="word"/></custom-block></script></block-definition><block-definition s="dictionary %&apos;keys&apos; %&apos;values&apos;" type="reporter" category="Dictionaries"><comment x="0" y="0" w="90" collapsed="false">Create a dictionary with keys (arg1) and values (arg2)&#xD;&#xD;ex.&#xD;dictionary([a,b], [1,2] = [[a, b], [1, 2]]</comment><header></header><code></code><translations></translations><inputs><input type="%mult%s"></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportNewList"><list></list></block></block><custom-block s="%upvar for each %upvar of %l %ca"><l>#</l><l>item</l><block var="keys"/><script><block s="doIfElse"><block s="reportLessThan"><custom-block s="count of %s in %l"><block var="item"/><block var="keys"/></custom-block><l>2</l></block><script><block s="doAddToList"><block s="reportNewList"><list><block var="item"/><block s="reportListItem"><block var="#"/><block var="values"/></block></list></block><block var="a"/></block></script><script><custom-block s="error %txt"><l>duplicate keys</l></custom-block></script></block></script></custom-block><block s="doReport"><block var="a"/></block></script></block-definition><block-definition s="$flash 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="doReport"><block s="reportListItem"><l>1</l><block s="reportListAttribute"><l><option>columns</option></l><block s="reportApplyExtension"><l>dta_analyze(list)</l><list><block var="data"/></list></block></block></block></block></script></block-definition><block-definition s="$flash 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="doReport"><block s="reportApplyExtension"><l>lst_sort(list, fn)</l><list><block var="data"/><block var="function"/></list></block></block></script></block-definition><block-definition s="$flash 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="doReport"><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block><block var="a-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="doForEach"><l>inner item</l><block var="data"/><script><block s="doSetVar"><l>item</l><block var="inner item"/></block><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="☠︎ linked? %&apos;data&apos;" type="predicate" category="lists" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>lst_linked(list)</l><list><block var="data"/></list></block></block></script></block-definition><block-definition s="☠︎ link %&apos;data&apos;" type="reporter" category="lists" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="reportCDR"><block var="data"/></block></block></block></script></block-definition><block-definition s="printable %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="188.66666666666666" collapsed="false">Takes a (possibly deep) list as input,&#xD;and reports a human-readable text form &#xD;of the list (namely, Lisp notation).&#xD;&#xD;Will not work on circular lists.</comment><header></header><code></code><translations>ca:notació textual de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><l>()</l></block></script></block><block s="doReport"><block s="reportJoinWords"><list><l>(</l><block s="reportAtomicCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="printable %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> </l><l></l></list></block></autolambda><list></list></block></block><l>)</l></list></block></block></script></block-definition><block-definition s="sentence %&apos;phrase&apos;" type="reporter" category="lists"><comment x="0" y="0" w="302.6666666666667" collapsed="false">SENTENCE is the main constructor for sentences, represented&#xD;as lists of words.  It takes zero or more inputs, each of which can&#xD;be either a list or a text string.  If a list, the input is assumed to be&#xD;a list of words.  If a text string, it is converted to a list of words using&#xD;SENTENCE→LIST.  Then all the lists of words are appended to form a new list of words.&#xD;&#xD;If the inputs are lists of lists rather than lists of words, SENTENCE,&#xD;like APPEND, does only one level of flattening, reporting a list of&#xD;all the items of all the input lists.</comment><header></header><code></code><translations>ca:frase _&#xD;</translations><inputs><input type="%mult%s"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>list</option></l></block><l></l><custom-block s="sentence $arrowRight list %txt"><l></l></custom-block></block></autolambda><list></list></block><block var="phrase"/></block></block></block></script></block-definition><block-definition s="$flash zip %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="192" collapsed="false">ZIP takes any number of lists as inputs.  The lists should all be the same length.  ZIP reports a list of lists in which the first item is a list of all the first items, the second item is a list of all the second items, etc.&#xD;Viewing the inputs as the rows of a matrix, ZIP reports its transpose.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>columns</option></l><block var="lists"/></block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="lists"><comment x="0" y="0" w="105.33333333333333" collapsed="false">The identity function reports its input.</comment><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="multimap %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="267.3333333333333" collapsed="false">Takes as input a function of N inputs and N lists.&#xD;The function is called with item 1 of all the lists as its inputs, with item 2 of all the lists as its inputs, and so on.  (The lists should all be the same length.)</comment><header></header><code></code><translations>ca:multi-mapeja _ sobre _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="function"/><custom-block s="%s"><l></l></custom-block></block></autolambda><list></list></block><custom-block s="$flash zip %mult%l"><block var="lists"/></custom-block></block></block></script></block-definition><block-definition s="count of %&apos;i&apos; in %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><l>0</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>a</l><block s="reportIfElse"><block s="reportEquals"><block var="i"/><block var="item"/></block><l>1</l><l>0</l></block></block></script></block><block s="doReport"><block var="a"/></block></script><scripts><script x="194.5869140625" y="69.50000000000011"><block var="item"/></script></scripts></block-definition><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><comment x="0" y="0" w="276" collapsed="false">Catch errors.&#xD;&#xD;Runs the first script.  If it succeeds, nothing else happens.&#xD;But if it has an error (something that would otherwise result&#xD;in a red halo around the block), then the second script is run,&#xD;with the text of the error message that would have been shown in the variable ERROR.</comment><header></header><code></code><translations>pt:tenta executar _ e, em caso de erro _ , executa _&#xD;ca:prova de forma segura _ i si _ _&#xD;</translations><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block var="action"/><block var="handler"/><block var="error"/></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><comment x="0" y="0" w="268.6666666666667" collapsed="false">Throw an error.&#xD;&#xD;Makes a red halo appear around the script that runs it,&#xD;with the input text shown in a speech balloon next to&#xD;the script, just like any Snap! error.&#xD;&#xD;This is useful to put in the second script of SAFELY TRY&#xD;after some other instructions to undo the partial work of&#xD;the first script.</comment><header></header><code></code><translations>pt:lança o erro _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="msg"/></list></block></script></block-definition><block-definition s="safely try reporting %&apos;this&apos; then if %&apos;error&apos; report %&apos;that&apos;" type="reporter" category="control"><comment x="0" y="0" w="316.6666666666667" collapsed="false">Catch errors in a reporter.&#xD;&#xD;Evaluates its first input.  If that expression successfully reports a value, this block reports that value.  If the expression causes a Snap! error,&#xD;then the final input slot is evaluated with the text of what would have&#xD;been the error message in variable ERROR.  SAFELY TRY then reports the value of that final expression.&#xD;&#xD;Sometimes you&apos;ll want to throw an error in the final expression.  You&#xD;can put an ERROR block inside a CALL block to do that.</comment><header></header><code></code><translations>ca:prova de forma segura reportant _ i si _ reportant _&#xD;</translations><inputs><input type="%anyUE"></input><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doDeclareVariables"><list><l>value</l></list></block><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doSetVar"><l>value</l><block s="evaluate"><block var="this"/><list></list></block></block></script><l>err</l><script><block s="doSetVar"><l>error</l><block var="err"/></block><block s="doSetVar"><l>value</l><block s="evaluate"><block var="that"/><list></list></block></block></script></custom-block><block s="doReport"><block var="value"/></block></script></block-definition><block-definition s="get item in %&apos;dict&apos; using key: %&apos;k&apos;" type="reporter" category="Dictionaries"><comment x="0" y="0" w="90" collapsed="false">Get an item in a dictionary using a key</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>item</l><block var="dict"/><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="item"/></block><block var="k"/></block><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="item"/></block></block></script></block></script></block><custom-block s="error %txt"><l>index out of bounds</l></custom-block></script></block></script></block-definition><block-definition s="get key at %&apos;i&apos; in %&apos;dict&apos;" type="reporter" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportListItem"><block var="i"/><block var="dict"/></block></block></block></script><l>error</l><script><custom-block s="error %txt"><l>index out of bounds</l></custom-block></script></custom-block></script></block></script></block-definition><block-definition s="set %&apos;key&apos; of %&apos;dict&apos; to %&apos;val&apos;" type="command" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input><input type="%s"></input></inputs><script><block s="doWarp"><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="count of %s in %l"><block var="key"/><custom-block s="all keys in %l"><block var="dict"/></custom-block></custom-block><l>1</l></block><script><custom-block s="error %txt"><l>duplicate keys</l></custom-block></script><script><block s="doIfElse"><block s="reportListContainsItem"><custom-block s="all keys in %l"><block var="dict"/></custom-block><block var="key"/></block><script><block s="doReplaceInList"><l>2</l><block s="reportListItem"><custom-block s="index of key: %s in %l"><block var="key"/><block var="dict"/></custom-block><block var="dict"/></block><block var="val"/></block></script><script><block s="doAddToList"><block s="reportNewList"><list><block var="key"/><block var="val"/></list></block><block var="dict"/></block></script></block></script></block></script></block></script><scripts><script x="362.5322265625" y="55.5"><block var="a"/></script><script x="250.1953125" y="281.8666666666667"><custom-block s="index of key: %s in %l"><l>d</l><block var="a"/></custom-block></script><script x="443.87890625" y="127.1666666666664"><block var="a"/></script></scripts></block-definition><block-definition s="index of key: %&apos;k&apos; in %&apos;dict&apos;" type="reporter" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><custom-block s="%upvar for each %upvar of %l %ca"><l>#</l><l>item</l><block var="dict"/><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="item"/></block><block var="k"/></block><script><block s="doReport"><block var="#"/></block></script></block></script></custom-block></script></block-definition><block-definition s="item %&apos;i&apos; in %&apos;dict&apos;" type="reporter" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doReport"><block s="reportListItem"><l>2</l><block s="reportListItem"><block var="i"/><block var="dict"/></block></block></block></script><l>error</l><script><custom-block s="error %txt"><l>index out of bounds</l></custom-block></script></custom-block></script></block-definition><block-definition s="run test %&apos;reporter&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block s="evaluate"><block var="reporter"/><list></list></block><block var="value"/></block><block s="reportJoinWords"><list><l>Test Succeded</l></list></block><block s="reportJoinWords"><list><l>Test Failed. Given Value: </l><block var="value"/><l>, Reported Value: </l><block s="evaluate"><block var="reporter"/><list></list></block></list></block></block></block></script></block-definition><block-definition s="all keys in %&apos;dict&apos;" type="reporter" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>item</l><block var="dict"/><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="item"/></block><block var="a"/></block></script></block><block s="doReport"><block var="a"/></block></script></block-definition><block-definition s="all items in %&apos;dict&apos;" type="reporter" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>item</l><block var="dict"/><script><block s="doAddToList"><block s="reportListItem"><l>2</l><block var="item"/></block><block var="a"/></block></script></block><block s="doReport"><block var="a"/></block></script></block-definition><block-definition s="abbriviate words in %&apos;sentence&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>ret</l></list></block><block s="doSetVar"><l>ret</l><l></l></block><block s="doForEach"><l>item</l><block s="reportTextSplit"><block var="sentence"/><l> </l></block><script><block s="doIfElse"><custom-block s="is %s a key in %l ?"><block var="item"/><custom-block s="var %s"><l>abbreviations</l></custom-block></custom-block><script><block s="doSetVar"><l>ret</l><block s="reportJoinWords"><list><block var="ret"/><l> </l><custom-block s="get item in %l using key: %s"><custom-block s="var %s"><l>abbreviations</l></custom-block><block var="item"/></custom-block></list></block></block></script><script><block s="doSetVar"><l>ret</l><block s="reportJoinWords"><list><block var="ret"/><l> </l><block var="item"/></list></block></block></script></block></script></block><block s="doReport"><block var="ret"/></block></script></block-definition><block-definition s="is %&apos;k&apos; a key in %&apos;dict&apos; ?" type="predicate" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListContainsItem"><custom-block s="all keys in %l"><block var="dict"/></custom-block><block var="k"/></block></block></script></block-definition><block-definition s="unabbreviate words in %&apos;sentence&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>ret</l></list></block><block s="doSetVar"><l>ret</l><l></l></block><block s="doForEach"><l>item</l><block s="reportTextSplit"><block var="sentence"/><l> </l></block><script><block s="doIfElse"><custom-block s="is %s a key in %l ?"><block var="item"/><custom-block s="var %s"><l>unabbreviations</l></custom-block></custom-block><script><block s="doSetVar"><l>ret</l><block s="reportJoinWords"><list><block var="ret"/><l> </l><custom-block s="get item in %l using key: %s"><custom-block s="var %s"><l>unabbreviations</l></custom-block><block var="item"/></custom-block></list></block></block></script><script><block s="doSetVar"><l>ret</l><block s="reportJoinWords"><list><block var="ret"/><l> </l><block var="item"/></list></block></block></script></block></script></block><block s="doReport"><block var="ret"/></block></script></block-definition><block-definition s="set abbriviation list to %&apos;dict&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="for %upvar , %upvar in %l %cs"><l>k</l><l>v</l><block var="dict"/><script><custom-block s="abbriviate %s as %s"><block var="k"/><block var="v"/></custom-block></script></custom-block></script></block-definition><block-definition s="for %&apos;k&apos; , %&apos;v&apos; in %&apos;dict&apos; %&apos;act&apos;" type="command" category="Dictionaries"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="dict"/></block><script><block s="doSetVar"><l>k</l><custom-block s="get key at %n in %l"><block var="i"/><block var="dict"/></custom-block></block><block s="doSetVar"><l>v</l><custom-block s="item %n in %l"><block var="i"/><block var="dict"/></custom-block></block><block s="doRun"><block var="act"/><list></list></block></script></block></script></block-definition><block-definition s="abbriviate %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l><l>b</l></list></block><block s="doSetVar"><l>a</l><custom-block s="sentence $arrowRight list %txt"><block var="words"/></custom-block></block><block s="doSetVar"><l>b</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>item</l><block var="a"/><script><block s="doAddToList"><block s="reportLetter"><l>1</l><block var="item"/></block><block var="b"/></block></script></block><block s="doReport"><block var="b"/></block></script><scripts><script x="74.9951171875" y="205.00000000000034"><block var="a"/></script></scripts></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><comment x="0" y="0" w="196" collapsed="false">Takes a sentence in text string form and reports the sentence as a list of its words.</comment><header></header><code></code><translations>de:Satz $arrowRight Liste _&#xD;ca:frase $arrowRight llista _&#xD;es:frase $arrowRight lista _&#xD;fr:phrase $arrowRight liste _&#xD;pt:uma lista com as palavras da frase _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportAtomicKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><block s="reportStringSize"><l></l></block><l>0</l></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></block></script></block-definition><block-definition s="abbriviate list of %&apos;words&apos; as %&apos;abbs&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="words"/></block><script><custom-block s="safely try %cs then if %upvar %cs"><script><custom-block s="abbriviate %s as %s"><block s="reportListItem"><block var="i"/><block var="words"/></block><block s="reportListItem"><block var="i"/><block var="abbs"/></block></custom-block></script><l>error</l><script><custom-block s="error %txt"><l>no</l></custom-block></script></custom-block></script></block></script></block-definition><block-definition s="clear abbriviations" type="command" category="operators"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="safely try %cs then if %upvar %cs"><script><custom-block s="delete var %mult%txt"><list><l>abbreviations</l></list></custom-block></script><l>error</l><script><custom-block s="pass"></custom-block></script></custom-block><custom-block s="safely try %cs then if %upvar %cs"><script><custom-block s="delete var %mult%txt"><list><l>unabbreviations</l></list></custom-block></script><l>error</l><script><custom-block s="pass"></custom-block></script></custom-block></script></block-definition><block-definition s="pass" type="command" category="control"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l></l></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="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="972"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="973"></list></costumes><sounds><list struct="atomic" id="974"></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="979"><costumes><list struct="atomic" id="980"></list></costumes><sounds><list struct="atomic" id="981"></list></sounds><blocks></blocks><variables></variables><scripts><script x="175" y="210"><custom-block s="abbriviate list of %l as %l"><block s="reportNewList"><list><l>with</l><l>without</l></list></block><block s="reportNewList"><list><l>w/</l><l>w/o</l></list></block></custom-block></script><script x="221" y="336.1666666666665"><custom-block s="clear abbriviations"></custom-block></script></scripts></sprite></sprites></stage><variables></variables></scene></scenes></project><media name="abbriviations" app="Snap! 7, https://snap.berkeley.edu" version="2"></media></snapdata>