<snapdata remixID="14342210"><project name="Minecraft" app="Snap! 10.7.2, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAA3pJREFUeF7t2sFtG0EQRFEyAcWiCJyLE7BjYUqKwLEwAfngs4BmdZG7hp7P0z3E24+5yNf3y/3z4h+BgsDH7e3hLVcBPmxm4AsBAUrjUAEBHsrvcgFq4FABAR7K73IBauBQAQEeyu9yAWrgUAEBHsrvcgFq4FABAR7K73IBauBQAQEeyu/yRMB/RkjUzNQEBFijtCgREGCiZqYmIMAapUWJgAATNTM1AQHWKC1KBASYqJmpCQiwRmlRIiDARM1MTUCANUqLEgEBJmpmagICrFFalAgIMFEzUxMQYI3SokRAgImamZqAAGuUFiUCAkzUzNQEBFijtCgREGCiZqYmIMAapUWJgAATNTM1AQHWKC1KBASYqJmpCQiwRmlRIiDARM1MTUCANUqLEgEBJmpmagICrFFalAgIMFEzUxMQYI3SokRAgImamZqAAGuUFiUCAkzUzNQEBFijtCgREGCiZqYmIMAapUWJgAATNTM1AQHWKC1KBASYqJmpCQiwRmlRIiDARM1MTUCANUqLEgEBJmpmagICrFFalAgIMFEzUxMQYI3SokRAgImamZqAAGuUFiUCAkzUzNQEBFijtCgREGCiZqYmIMAapUWJgAATNTM1AQHWKC1KBASYqJmpCQiwRmlRIiDARM1MTUCANUqLEgEBJmpmagLfMsCP21sNsLXox+97a9V/tUeAJ/lcAjzJh3jFz/ACvkJ5docXcOb09FNewKcTn+cCL+B5voUX8CTfwgt4kg/xip/hBXyF8uwOL+DM6emnvIBPJz7PBV7A83wLL+BJvoUX8CQf4hU/wwv4CuXZHV7AmdPTT3kBn058ngsefQH//Hzst/96+55/131M6d9pL+BATYADpPCIAAdwAhwghUcEOIAT4AApPCLAAZwAB0jhEQEO4AQ4QAqPCHAAJ8ABUnhEgAM4AQ6QwiMCHMAJcIAUHhHgAE6AA6TwiAAHcAIcIIVHBDiAE+AAKTxyfb9fPsNZYwTWAgJcE1qwERDgRs/sWkCAa0ILNgIC3OiZXQsIcE1owUZAgBs9s2sBAa4JLdgICHCjZ3YtIMA1oQUbAQFu9MyuBQS4JrRgI3C93/wteANodicgwJ2f6aWAAJeAxncCAtz5mV4KCHAJaHwnIMCdn+mlgACXgMZ3AgLc+ZleCghwCWh8JyDAnZ/ppYAAl4DGdwJ/ATUIahjjCTknAAAAAElFTkSuQmCC</thumbnail><scenes select="1"><scene name="Minecraft"><notes></notes><palette><category name="Streams" color="164,0,0,1"/><category name="Microworld" color="0,116,143,1"/><category name="Translations" color="143,0,37,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;pl:przechwyć _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="run %cmdRing with continuation"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _&#xD;ca:llança _&#xD;es:lanzar _&#xD;fr:lance _&#xD;pt:lança _&#xD;pl:wyrzuć _&#xD;</translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;pl:przechwyć _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><custom-block s="run %cmdRing with continuation"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></custom-block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _ _&#xD;ca:llança _ _&#xD;es:lanzar _ _&#xD;fr:lance _ _&#xD;pt:lança _ _&#xD;pl:wyrzuć _ _&#xD;</translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><comment x="0" y="0" w="263.3333333333333" collapsed="false">This is a breakpoint block, to be used in debugging.&#xD;The Boolean input specifies the condition under which&#xD;the program should pause.  (Use True for an unconditional breakpoint.)  The intent is that the script should have&#xD;SHOW VARIABLE blocks for the process&apos;s local variables.&#xD;After the pause, this block automatically hides all temporary variables.</comment><header></header><code></code><translations>de:falls _ dann _ und pause $pause-1-255-220-0&#xD;ca:si _ fes _ i atura-ho tot $pause-1-255-220-0&#xD;es:si _ haz _ y páralo todo $pause-1-255-220-0&#xD;fr:si _ faire _ et mettre tout en pause $pause-1-255-220-0&#xD;pt:se _ , então _ e faz pausa em tudo $pause-1-255-220-0&#xD;pl:jeżeli _ wykonaj _ i pauzuj wszystko $pause-1-255-220-0&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script><list></list></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><comment x="0" y="0" w="206.66666666666666" collapsed="false">This block does nothing.&#xD;Use it when you are calling a reporter&#xD;for its side effect and don&apos;t care about&#xD;its return value.</comment><header></header><code></code><translations>de:ignoriere _&#xD;ca:ignora _&#xD;es:ignorar _&#xD;fr:ignore _&#xD;pt:ignora _&#xD;</translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="cascade %&apos;num&apos; times %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="138" collapsed="false">Call f(f(f(...(f(x))))) n times where the three input slots are n, f, and x from left to right.  The # variable can be used inside f to represent how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado de _ invocações em cascata de _ com argumento inicial _ _&#xD;ca:en cascada _ vegades _ _ _&#xD;pl:kaskada _ razy _ _ _&#xD;</translations><inputs><input type="%n"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="cascade until %&apos;pred&apos; %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="210.47493489583334" collapsed="false">Call f(f(f(...(f(x))))) until condition is true, where the three input slots are condition, f, and x from left to right.  The # variable can be used inside f or condition to indicate how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado da invocação em cascata até que _ de _ com argumento inicial _ _&#xD;ca:en cascada fins _ _ _ _&#xD;pl:kaskada aż _ _ _ _&#xD;</translations><inputs><input type="%predRing"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list><block var="result"/></list></block><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="compose %&apos;f&apos; %&apos;g&apos;" type="reporter" category="control"><comment x="0" y="0" w="151.33333333333334" collapsed="false">Returns the function x↦f(g(x)) where f and g are the two inputs.</comment><header></header><code></code><translations>pt:a composição de _ com _&#xD;ca:composa _ _&#xD;pl:skomponuj _ _&#xD;</translations><inputs><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="f"/><list><block s="evaluate"><block var="g"/><list><l></l></list></block></list></block></autolambda><list></list></block></block></script></block-definition><block-definition s="repeat %&apos;action&apos; until %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="202.66666666666666" collapsed="false">Like the built-in REPEAT UNTIL block, except that the ending condition is not tested until the script has been run the first time.  So the script is run at least once.</comment><header></header><code></code><translations>pt:repete _ até que _ $loop-0.7&#xD;ca:repeteix _ fins _&#xD;pl:powtarzaj _ aż _&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;action&apos; while %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="287.3333333333333" collapsed="false">Run the script repeatedly, as long as the given condition is true.  Runs the script at least once before testing the condition.</comment><header></header><code></code><translations>pt:repete _ enquanto _ $loop-0.7&#xD;ca:repeteix _ mentre _&#xD;pl:powtarzaj _ gdy _&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat while %&apos;pred&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="264" collapsed="false">Runs the script repeatedly, as long as the condition is true. Tests the condition before the first time the script is run.  Like the built in REPEAT UNTIL except that in this block the condition must be true, not false.</comment><header></header><code></code><translations>pt:enquanto _ , repete _ $loop-0.7&#xD;pl:powtarzaj gdy _ _&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;num&apos; %&apos;#&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="171" collapsed="false">Runs the script the specified number of times, like the built-in REPEAT block, but this one provides the # variable that can be used inside the script.  Try&#xD;REPEAT (200)&#xD;                MOVE (#) STEPS&#xD;   RIGHT 92&#xD;with the pen down.</comment><header></header><code></code><translations>pt:repete _ vezes _ _ $loop-0.7&#xD;ca:repeteix _ _ _&#xD;pl:powtórz _ _ _&#xD;</translations><inputs><input type="%n"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><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="for %&apos;i&apos; = %&apos;start&apos; step %&apos;step&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="247.33333333333334" collapsed="false">The primitive FOR block uses an implicit step of ±1 depending on which of the starting and ending values is larger.  This version allows you to provide an explicit step value.  If the sign of the step input is incompatible with the ordering of the starting and ending values, the script will not be run at all.</comment><header></header><code></code><translations>pt:para _ de _ com passo _ a _ _ $loop-0.7&#xD;ca:per _ = _ incrementant _ fins _ _&#xD;pl:dla _ = _ co _ do _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doIfElse"><block s="reportVariadicLessThan"><list><block var="step"/><l>0</l></list></block><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script></block><block s="doUntil"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="let %&apos;a&apos; be %&apos;val&apos; in %&apos;loop&apos; %&apos;body&apos;" type="command" category="control"><comment x="0" y="0" w="238.66666666666666" collapsed="false">Provides LOOP as a function of one input that runs&#xD;the body of the LET with A set to the function input,&#xD;so the body can run itself recursively.&#xD;See COPY block in Variables for an example of use.</comment><header></header><code></code><translations>pt:tendo _ o valor inicial _ , executa _ definido como _&#xD;ca:fes que _ sigui _ al _ _&#xD;pl:ustaw _ na _ w _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>a</l><block var="val"/></block><block s="doSetVar"><l>loop</l><block s="reifyScript"><script><block s="doSetVar"><l>a</l><block var="new value"/></block><block s="doRun"><block var="body"/><list><block var="a"/></list></block></script><list><l>new value</l></list></block></block><block s="doRun"><block var="loop"/><list><block var="a"/></list></block></script></block-definition><block-definition s="run %&apos;action&apos; with continuation" type="command" category="control"><header></header><code></code><translations>de:führe _ mit Continuation aus&#xD;</translations><inputs><input type="%cmdRing" initial="1"></input></inputs><script><block s="doRun"><block var="action"/><list><block s="reportEnvironment"><l><option>continuation</option></l></block></list></block></script></block-definition><block-definition s="call %&apos;action&apos; with continuation" type="reporter" category="control"><header></header><code></code><translations>de:rufe _ mit Continuation auf&#xD;</translations><inputs><input type="%cmdRing" initial="1"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reifyReporter"><script><custom-block s="run %cmdRing with continuation"><block var="action"/></custom-block></script><list></list></block><list></list></block></block></script></block-definition><block-definition s="parse code %&apos;code&apos; to blocks" type="reporter" category="operators"><comment x="0" y="0" w="104" collapsed="false">turn LISP syntax text code into blocks</comment><header></header><code></code><translations>de:verwandle Code _ in Blöcke&#xD;ca:blocs del codi textual _&#xD;</translations><inputs><input type="%code" initial="1">(+ 3 4)</input></inputs><script><block s="doReport"><block s="reportJoinWords"><block s="reportTextSplit"><block var="code"/><l><option>blocks</option></l></block></block></block></script></block-definition><block-definition s="encode blocks %&apos;script&apos; to text %&apos;lines&apos; pretty" type="reporter" category="operators"><comment x="0" y="0" w="106" collapsed="false">turn blocks into LISP syntax text code.</comment><header></header><code></code><translations>de:verwandle Blöcke _ in Code _ formatiert&#xD;ca:codi textual dels blocs _ formatats _&#xD;</translations><inputs><input type="%repRing" initial="1"></input><input type="%b" initial="1">true</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportListAttribute"><l></l><block s="reportTextSplit"><block var="script"/><l><option>blocks</option></l></block></block></autolambda><list></list></block><list><block s="reportIfElse"><block var="lines"/><l>lines</l><l>text</l></block></list></block></block></script></block-definition><block-definition s="object %&apos;fields&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:Objekt _&#xD;</translations><inputs><input type="%group%t%s" irreplaceable="true" expand="$nl&#xD;:" initial="2" min="2">$_field&#xD;$_thing</input></inputs><script><block s="doDeclareVariables"><list><l>data</l></list></block><block s="doSetVar"><l>data</l><block s="reportNewList"><list></list></block></block><block s="doWarp"><script><block s="doForEach"><l>assoc</l><block var="fields"/><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/><block s="reportListItem"><l>2</l><block var="assoc"/></block></block><block s="doTellTo"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyScript"><script><block s="doSetVar"><l></l><l></l></block></script><list></list></block><list><block s="reportListItem"><l>1</l><block var="assoc"/></block><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/></block></list></block></script></block></script></block><block s="doReport"><block var="data"/></block></script></block-definition><block-definition s="clone %&apos;parent&apos; %&apos;fields&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:klone _ _&#xD;</translations><inputs><input type="%l" initial="1"></input><input type="%group%upvar%s" irreplaceable="true" expand="$nl&#xD;:">$_field&#xD;$_thing</input></inputs><script><block s="doDeclareVariables"><list><l>data</l></list></block><block s="doSetVar"><l>data</l><custom-block s="object %group%t%s"><list><l>...</l><block var="parent"/></list></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportListIsEmpty"><block var="fields"/></block></block><script><block s="doWarp"><script><block s="doForEach"><l>assoc</l><block var="fields"/><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/><block s="reportListItem"><l>2</l><block var="assoc"/></block></block><block s="doTellTo"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyScript"><script><block s="doSetVar"><l></l><l></l></block></script><list></list></block><list><block s="reportListItem"><l>1</l><block var="assoc"/></block><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/></block></list></block></script></block></script></block></script><list></list></block><block s="doReport"><block var="data"/></block></script></block-definition><block-definition s="field %&apos;field&apos; of %&apos;object&apos; %&apos;inputs&apos;" type="reporter" category="lists" space="true"><header></header><code></code><translations>de:Feld _ von _ _&#xD;</translations><inputs><input type="%anyUE" initial="1"><options>§_dynamicMenu</options></input><input type="%l" initial="1"></input><input type="%mult%s" expand="$_with inputs"></input></inputs><script><block s="doDeclareVariables"><list><l>syntax</l><l>value</l></list></block><block s="doSetVar"><l>syntax</l><block s="reportTextSplit"><block var="field"/><l><option>blocks</option></l></block></block><block s="doSetVar"><l>value</l><block s="reportListItem"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="syntax"/></block><block s="reifyReporter"><autolambda><block var=" "/></autolambda><list></list></block></list></block><block s="reportListItem"><l>2</l><block var="syntax"/></block><block s="evaluate"><block var="field"/><list></list></block></block><block var="object"/></block></block><block s="doIf"><block s="reportIsA"><block var="value"/><l><option>script</option></l></block><script><block s="doSetVar"><l>syntax</l><block s="reportListAttribute"><l><option>flatten</option></l><block s="reportTextSplit"><block var="value"/><l><option>blocks</option></l></block></block></block><block s="doIf"><block s="reportVariadicOr"><list><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="syntax"/></block><l><option>command</option></l></block></block><block s="reportListContainsItem"><block var="syntax"/><block s="reifyScript"><script><block s="doReport"><l></l></block></script><list></list></block></block></list></block><script><block s="doReport"><block s="evaluate"><block var="value"/><block var="inputs"/></block></block></script><list></list></block><block s="doRun"><block var="value"/><block var="inputs"/></block><block s="doReport"><l></l></block></script><list></list></block><block s="doReport"><block var="value"/></block></script><scripts><script x="10" y="467.49999999999994"><block s="receiveSlotEvent"><l>field</l><l><option>menu</option></l></block><block s="doReport"><block s="reportListAttribute"><l><option>sorted</option></l><block s="reportListAttribute"><l><option>uniques</option></l><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportConcatenatedLists"><list><block s="reportListItem"><l>1</l><block s="reportListAttribute"><l><option>columns</option></l><l/></block></block><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l><option>parent</option></l><l/></block><l><option>list</option></l></block><block s="evaluate"><block s="reportEnvironment"><l><option>script</option></l></block><list><block s="reportListItem"><l><option>parent</option></l><l/></block></list></block><block s="reportNewList"><list></list></block></block></list></block></autolambda><list></list></block><list><block var="object"/></list></block></block></block></block></script><script x="10" y="709.8333333333335"><block s="receiveSlotEvent"><l>field</l><l><option>edited</option></l></block><block s="doDeclareVariables"><list><l>value</l></list></block><block s="doSetVar"><l>value</l><block s="reportListItem"><block s="evaluate"><block var="field"/><list></list></block><block var="object"/></block></block><block s="doSetSlot"><l>inputs</l><block s="reportReshape"><block var="inputs"/><list><block s="reportIfElse"><block s="reportIsA"><block var="value"/><l><option>script</option></l></block><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><l/></block><block s="reportListAttribute"><l><option>length</option></l><block s="reportTextSplit"><block s="reportListItem"><l>1</l><l/></block><l><option>blocks</option></l></block></block></block></autolambda><list></list></block><list><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><l/></block><l><option>list</option></l></block><block s="reportListItem"><l>1</l><l/></block><l></l></block></autolambda><list></list></block><list><block s="reportTextSplit"><block var="value"/><l><option>blocks</option></l></block></list></block></list></block><l>0</l></block></list></block></block></script></scripts></block-definition><block-definition s="add %&apos;fields&apos; to %&apos;data&apos;" type="command" category="lists"><header></header><code></code><translations>de:füge _ zu _ hinzu&#xD;</translations><inputs><input type="%group%upvar%s" irreplaceable="true" expand="$nl&#xD;:" initial="2" min="2">$_field&#xD;$_thing</input><input type="%l" initial="1"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>assoc</l><block var="fields"/><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/><block s="reportListItem"><l>2</l><block var="assoc"/></block></block><block s="doTellTo"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyScript"><script><block s="doSetVar"><l></l><l></l></block></script><list></list></block><list><block s="reportListItem"><l>1</l><block var="assoc"/></block><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="assoc"/></block><block var="data"/></block></list></block></script></block></script></block></script></block-definition><block-definition s="when variable %&apos;variable&apos; changes" type="hat" category="variables"><variables><list struct="atomic" id="798">old</list></variables><header></header><code></code><translations>de:Wenn Variable _ sich ändert&#xD;</translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_getVarNamesDict</options></input></inputs><script><block s="doIf"><block s="reportVariadicOr"><list><block s="reportNot"><block s="reportListContainsItem"><block s="reportAttributeOf"><l><option>variables</option></l><block s="reportEnvironment"><l><option>caller</option></l></block></block><block var="variable"/></block></block><block s="reportVariadicEquals"><list><block s="reportAttributeOf"><block var="variable"/><block s="reportEnvironment"><l><option>caller</option></l></block></block><block var="old"/></list></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doSetVar"><l>old</l><block s="reportAttributeOf"><block var="variable"/><block s="reportEnvironment"><l><option>caller</option></l></block></block></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="when %&apos;sensor&apos; &gt; %&apos;threshold&apos;" type="hat" category="sensing"><header></header><code></code><translations>de:Wenn _ &gt; _&#xD;</translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1">$_volume<options>volume=$_volume&#xD;timer=$_timer</options></input><input type="%n" initial="1">5</input></inputs><script><block s="doReport"><block s="reportVariadicGreaterThan"><list><block s="evaluate"><block s="reportListItem"><block s="reportApplyExtension"><l>txt_transform(name, txt)</l><list><l>unselect</l><block var="sensor"/></list></block><block s="reportNewList"><list><block s="reportNewList"><list><l>volume</l><block s="reifyReporter"><autolambda><block s="reportAudio"><l><option>volume</option></l></block></autolambda><list></list></block></list></block><block s="reportNewList"><list><l>timer</l><block s="reifyReporter"><autolambda><block s="getTimer"></block></autolambda><list></list></block></list></block></list></block></block><list></list></block><block var="threshold"/></list></block></block></script></block-definition><block-definition s="when background switches to %&apos;costume name&apos;" type="hat" category="looks"><header></header><code></code><translations>de:Wenn Hintergrund zu _ wechselt&#xD;</translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_dynamicMenu</options></input></inputs><script><block s="doReport"><block s="reportVariadicEquals"><list><block s="reportAttributeOf"><l><option>costume name</option></l><block s="reportGet"><l><option>stage</option></l></block></block><block var="costume name"/></list></block></block></script><scripts><script x="10" y="121.83333333333331"><block s="receiveSlotEvent"><l>costume name</l><l><option>menu</option></l></block><block s="doReport"><block s="reportGetImageAttribute"><l><option>name</option></l><block s="reportAskFor"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>costumes</option></l></block></autolambda><list></list></block><list></list></block></block></block></script></scripts></block-definition><block-definition s="has %&apos;test&apos; happened?" type="predicate" category="operators"><variables><list struct="atomic" id="934">last state</list></variables><header></header><code></code><translations>de:hat _ sich ereignet?&#xD;</translations><inputs><input type="%b" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="test"/><block var="last state"/></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doSetVar"><l>last state</l><block var="test"/></block><block s="doReport"><block var="test"/></block></script></block-definition><block-definition s="has %&apos;value&apos; changed?" type="predicate" category="variables"><variables><list struct="atomic" id="957">old</list></variables><header></header><code></code><translations>de:hat _ sich verändert?&#xD;</translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="value"/><block var="old"/></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doSetVar"><l>old</l><block var="value"/></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="when %&apos;value&apos; changes" type="hat" category="control"><variables><list struct="atomic" id="982">old</list></variables><header></header><code></code><translations>de:Wenn _ sich ändert&#xD;</translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="value"/><block var="old"/></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doSetVar"><l>old</l><block var="value"/></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></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><scripts><script x="11.999999999999998" y="147.55555555555554"><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><list></list></block></script></block></script><list></list></block></block><block s="doSetVar"><l>merge</l><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="#1"/><block s="reportNewList"><list></list></block></list></block><script><block s="doReport"><block var="#2"/></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="#2"/><block s="reportNewList"><list></list></block></list></block><script><block s="doReport"><block var="#1"/></block></script><list></list></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="reportVariadicEquals"><list><block var="data"/><block s="reportNewList"><list></list></block></list></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list></list></block></list></block><script><block s="doReport"><block var="data"/></block></script><list></list></block><block s="doRun"><block var="split"/><list></list></block><block s="doReport"><block s="evaluate"><block var="merge"/><list><custom-block s="$flash sort %l ordering with %predRing"><block var="odd items"/><block var="function"/></custom-block><custom-block s="$flash sort %l ordering with %predRing"><block var="even items"/><block var="function"/></custom-block></list></block></block></script></scripts></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;pl:$flash skojarz _ _&#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="reportVariadicEquals"><list><block var="key"/><block s="reportListItem"><l>1</l><l/></block></list></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;pl:_ dla każdego _ z _ _&#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><list></list></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></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><list></list></block><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><l>()</l></block></script><list></list></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;es:oración _&#xD;pl:zdanie _&#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>pl:$flash spakuj _&#xD;</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.33333333333331" 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></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><block s="reportListAttribute"><l><option>columns</option></l><block var="lists"/></block></block></block></script></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;pl:zdanie $arrowRight lista _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><l></l></block><l>0</l></list></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="text"/><l><option>word</option></l></block></block></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;ca:sistema numèric d&apos;Scheme _&#xD;pl:system liczbowy Scheme _&#xD;</translations><inputs><input type="%b"></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/biginteger.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/schemeNumber.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/bignums.js</l></list></block><block s="doApplyExtension"><l>big_switch(bool)</l><list><block var="bool"/></list></block></script></block-definition><block-definition s="%&apos;n&apos; !" type="reporter" category="operators"><comment x="0" y="0" w="190.66666666666666" collapsed="false">The factorial function, to make very large numbers, to demo bignums.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="n"/><l>0</l></list></block><l>1</l><block s="reportVariadicProduct"><list><block var="n"/><custom-block s="%n !"><block s="reportDifference"><block var="n"/><l>1</l></block></custom-block></list></block></block></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;ca:Scheme _ de _&#xD;pl:liczba _ z _&#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="reportApplyExtension"><l>big_scheme(fn, num)</l><list><block var="function"/><block var="number"/></list></block></block></script></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;pl:bezpiecznie spróbuj _ a jeśli _ _&#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;pl:bezpiecznie spróbuj zgłosić _ a jeśli _ zgłoś _&#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="do in parallel %&apos;actions&apos; and wait" type="command" category="control"><comment x="0" y="0" w="238.66666666666666" collapsed="false">Accepts any number of scripts as inputs.  Launches a separate thread for each of them, so they are done in parallel, then waits for them all to complete.&#xD;&#xD;This doesn&apos;t change how the Snap! scheduler works; the threads are not truly asynchronous. And there is no increase in speed.  Rather, the point of this block is to allow starting synchronized but independent scripts.</comment><header></header><code></code><translations>pt:executa _ em paralelo e espera&#xD;ca:executa en paral·lel _ i espera&#xD;pl:wykonaj równolegle _ i czekaj&#xD;</translations><inputs><input type="%mult%cs" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>threads</l></list></block><block s="doSetVar"><l>threads</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>is running?</l></list></block><block s="doSetVar"><l>is running?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="fork"><block s="reifyScript"><script><block s="doRun"><block var="each script"/><list></list></block><block s="doSetVar"><l>is running?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><list></list></block><block s="doReport"><block s="reifyScript"><script><block s="doReport"><block var="is running?"/></block></script><list></list></block></block></script><list></list></block><list></list></block></autolambda><list><l>each script</l></list></block><block var="actions"/></block></block><block s="doWaitUntil"><block s="reportListIsEmpty"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="evaluate"><block var="test"/><list></list></block></autolambda><list><l>test</l></list></block><block var="threads"/></block></block></block></script></block-definition><block-definition s="do in parallel %&apos;actions&apos;" type="command" category="control"><comment x="0" y="0" w="238.66666666666666" collapsed="false">Accepts any number of scripts as inputs.  Launches a separate thread for each of them, so they are done in parallel, then continues with the current script while they all run.&#xD;&#xD;This doesn&apos;t change how the Snap! scheduler works; the threads are not truly asynchronous. And there is no increase in speed.  Rather, the point of this block is to allow starting synchronized but independent scripts.</comment><header></header><code></code><translations>pt:executa _ em paralelo&#xD;ca:executa en paral·lel _&#xD;pl:wykonaj równolegle _&#xD;</translations><inputs><input type="%mult%cs" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="actions"/></block><l>0</l></list></block><script><block s="fork"><block s="reportListItem"><l>1</l><block var="actions"/></block><list></list></block><custom-block s="do in parallel %mult%cs"><block s="reportCDR"><block var="actions"/></block></custom-block></script><list></list></block></script></block-definition><block-definition s="setting %&apos;which&apos;" type="reporter" category="sensing"><comment x="0" y="0" w="254.66666666666666" collapsed="false">Allows reading global settings programmatically.&#xD;&#xD;Eisenberg&apos;s Law:  Anything you can do from the user interface you should be able to do in your program, and vice versa.  This library is just a beginning; there are many UI controls outside of the Settings menu.</comment><header></header><code></code><translations>pt:o valor da configuração _&#xD;ca:paràmetre _&#xD;pl:ustawienie _&#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;Hyper blocks 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([stage.dimensions.x, stage.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 !!this.scripts.focus;&#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;    case &apos;Hyper blocks support&apos;:&#xD;        return Process.prototype.enableHyperOps;&#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"><comment x="0" y="0" w="254.66666666666666" collapsed="false">Allows changing global settings programmatically.&#xD;This block is for Boolean (checkbox) settings; use&#xD;SET VALUE for numeric or text values.&#xD;&#xD;Eisenberg&apos;s Law:  Anything you can do from the user interface you should be able to do in your program, and vice versa.  This library is just a beginning; there are many UI controls outside of the Settings menu.</comment><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;ca:fixa el paràmetre _ a _&#xD;pl:ustaw flagę _ na _&#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&#xD;Hyper blocks 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 (thisObj.scripts.focus &amp;&amp; !tf) {&#xD;            thisObj.scripts.focus.stopEditing();&#xD;        } else if (tf &amp;&amp; !thisObj.scripts.focus) {&#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;    case &apos;Hyper blocks support&apos;:&#xD;        Process.prototype.enableHyperOps = tf;&#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"><comment x="0" y="0" w="254.66666666666666" collapsed="false">Allows changing global settings programmatically.&#xD;This block is for numeric or text settings; use&#xD;SET FLAG for Boolean (checkbox) values.&#xD;&#xD;Eisenberg&apos;s Law:  Anything you can do from the user interface you should be able to do in your program, and vice versa.  This library is just a beginning; there are many UI controls outside of the Settings menu.</comment><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;ca:fixa el valor de _ a _&#xD;pl:ustaw wartość _ na _&#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="zip %&apos;fun&apos; inputs: $nl %&apos;a&apos; leaf-rank %&apos;a-rank&apos; $nl %&apos;b&apos; leaf-rank %&apos;b-rank&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%s"></input><input type="%n">0</input><input type="%s"></input><input type="%n">0</input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>rank</option></l><block var="a"/></block><block var="a-rank"/></list></block><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>rank</option></l><block var="b"/></block><block var="b-rank"/></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="zip %repRing inputs: %br %s leaf-rank %n %br %s leaf-rank %n"><block var="fun"/><block s="reportListItem"><l></l><block var="a"/></block><block var="a-rank"/><block s="reportListItem"><l></l><block var="b"/></block><block var="b-rank"/></custom-block></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block s="reportVariadicMin"><list><block s="reportListAttribute"><l><option>length</option></l><block var="a"/></block><block s="reportListAttribute"><l><option>length</option></l><block var="b"/></block></list></block></block></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="zip %repRing inputs: %br %s leaf-rank %n %br %s leaf-rank %n"><block var="fun"/><l></l><block var="a-rank"/><block var="b"/><block var="b-rank"/></custom-block></autolambda><list></list></block><block var="a"/></block></block><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>rank</option></l><block var="b"/></block><block var="b-rank"/></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="zip %repRing inputs: %br %s leaf-rank %n %br %s leaf-rank %n"><block var="fun"/><block var="a"/><block var="a-rank"/><l></l><block var="b-rank"/></custom-block></autolambda><list></list></block><block var="b"/></block><block s="evaluate"><block var="fun"/><list><block var="a"/><block var="b"/></list></block></block></block></block></script></block-definition><block-definition s="ask %&apos;question&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s">what&apos;s your name?</input></inputs><script><block s="doAsk"><block var="question"/></block><block s="doReport"><block s="getLastAnswer"></block></block></script></block-definition><block-definition s="notify %&apos;message&apos;" type="command" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s">Alert!</input></inputs><script><block s="doTellTo"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyScript"><script><block s="doAsk"><block s="reportNewList"><list><block s="reportApplyExtension"><l>ide_translate(text)</l><list><block var="message"/></list></block><block s="reportNewList"><list><block s="reportApplyExtension"><l>ide_translate(text)</l><list><l>Ok</l></list></block></list></block></list></block></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="prompt %&apos;title&apos; options %&apos;options&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s">choose!</input><input type="%mult%s"></input></inputs><script><block s="doReport"><custom-block s="ask %s"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="title"/><l></l></list></block><block var="options"/><block s="reportNewList"><list><block s="reportApplyExtension"><l>ide_translate(text)</l><list><block var="title"/></list></block><block var="options"/></list></block></block></custom-block></block></script></block-definition><block-definition s="submenu %&apos;title&apos; items %&apos;items&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s">title</input><input type="%mult%s"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="title"/><l></l></list></block><l>menu</l><block s="reportApplyExtension"><l>ide_translate(text)</l><list><block var="title"/></list></block></block><block var="items"/></list></block></block></script></block-definition><block-definition s="divider" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block-definition><block-definition s="menu item icon %&apos;icon&apos; label %&apos;text&apos; value %&apos;value&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>§_objectsMenu</options></input><input type="%s">option</input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="icon"/><l></l></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="text"/><l></l></list></block><block var="value"/><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="value"/><l></l></list></block><block var="text"/><block s="reportNewList"><list><block var="text"/><block var="value"/></list></block></block></block><block s="reportNewList"><list><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="text"/><l></l></list></block><block s="reportIfElse"><block s="reportIsA"><block var="icon"/><l><option>text</option></l></block><block s="reportObject"><block var="icon"/></block><block var="icon"/></block><block s="reportNewList"><list><block s="reportIfElse"><block s="reportIsA"><block var="icon"/><l><option>text</option></l></block><block s="reportObject"><block var="icon"/></block><block var="icon"/></block><block var="text"/></list></block></block><block var="value"/></list></block></block></block></script></block-definition><block-definition s="menu item speech ballon %&apos;orientation&apos; message %&apos;message&apos; value %&apos;value&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">left<options>left&#xD;right</options></input><input type="%s">hey!</input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="value"/><l></l></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="orientation"/><l>right</l></list></block><block s="reportNewList"><list><l></l><block var="message"/></list></block><block s="reportNewList"><list><block var="message"/></list></block></block><block s="reportNewList"><list><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="orientation"/><l>right</l></list></block><block s="reportNewList"><list><l></l><block var="message"/></list></block><block s="reportNewList"><list><block var="message"/></list></block></block><block var="value"/></list></block></block></block></script></block-definition><block-definition s="menu examples" type="command" category="sensing"><comment x="0" y="0" w="212" collapsed="false">open my definition to look at examples how to use the menu blocks</comment><header></header><code></code><translations></translations><inputs></inputs><scripts><script x="10" y="79.00000000000001"><block s="doAsk"><l>what&apos;s your name?</l></block></script><script x="10" y="118.00000000000001"><custom-block s="ask %s"><l>what&apos;s your name?</l></custom-block></script><script x="10" y="151"><custom-block s="notify %s"><l>Alert!</l></custom-block></script><script x="10" y="190"><custom-block s="prompt %s options %mult%s"><l>choose!</l><list><l>foo</l><l>bar</l><l>baz</l></list></custom-block></script><script x="10" y="223"><custom-block s="prompt %s options %mult%s"><l>choose!</l><block s="reportGet"><l><option>costumes</option></l></block></custom-block></script><script x="10" y="261"><custom-block s="submenu %s items %mult%s"><l>more</l><list><l>frob</l><l>quux</l><l>garply</l></list></custom-block></script><script x="10" y="294"><custom-block s="prompt %s options %mult%s"><l>choose!</l><list><l>foo</l><l>bar</l><custom-block s="divider"></custom-block><custom-block s="submenu %s items %mult%s"><l>more</l><list><l>frob</l><custom-block s="submenu %s items %mult%s"><l></l><list><l>fred</l><l>test</l></list></custom-block><custom-block s="divider"></custom-block><l>quux</l><l>garply</l></list></custom-block><l>baz</l></list></custom-block></script><script x="10" y="377.8333333333334"><custom-block s="menu item icon %s label %s value %s"><l></l><l>option</l><l></l></custom-block></script><script x="10" y="411.8333333333334"><custom-block s="prompt %s options %mult%s"><l>choose!</l><list><custom-block s="menu item icon %s label %s value %s"><l>monkey</l><l>monkey</l><block s="reportObject"><l>monkey</l></block></custom-block><custom-block s="menu item icon %s label %s value %s"><l>Octo</l><l></l><l>42</l></custom-block><custom-block s="menu item icon %s label %s value %s"><l></l><l>choice</l><l>yay!</l></custom-block><custom-block s="divider"></custom-block><custom-block s="submenu %s items %mult%s"><l>more</l><list><custom-block s="menu item icon %s label %s value %s"><l>Alonzo</l><l>Alonzo</l><block s="reportObject"><l>Alonzo</l></block></custom-block><custom-block s="menu item icon %s label %s value %s"><l></l><l>foo</l><l>bar</l></custom-block></list></custom-block></list></custom-block></script><script x="10" y="565.8333333333335"><custom-block s="menu item speech ballon %s message %s value %s"><l>left</l><l>hey!</l><l></l></custom-block></script><script x="10" y="599.8333333333335"><custom-block s="prompt %s options %mult%s"><l>choose!</l><list><custom-block s="menu item speech ballon %s message %s value %s"><l>left</l><l>hey!</l><l></l></custom-block><custom-block s="menu item speech ballon %s message %s value %s"><l>right</l><l>wassup?</l><l></l></custom-block><custom-block s="menu item speech ballon %s message %s value %s"><l>left</l><block s="reportObject"><l>Alonzo</l></block><l></l></custom-block><custom-block s="menu item speech ballon %s message %s value %s"><l>right</l><l>so?</l><block s="reportGet"><l><option>costumes</option></l></block></custom-block></list></custom-block></script></scripts></block-definition><block-definition s="costume from text %&apos;text&apos; size %&apos;size&apos;" type="reporter" category="looks"><header></header><code></code><translations>de:Kostüm aus Text _ Größe _&#xD;pt:um traje com o texto _ de tamanho _&#xD;ca:vestit amb el text _ i mida _&#xD;</translations><inputs><input type="%s">A</input><input type="%n">72</input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>x</l><l>y</l><l>dir</l><l>cst</l><l>tmp</l><l>trails</l><l>pen state</l></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="text"/><l> </l></list></block><script><block s="doSetVar"><l>tmp</l><custom-block s="costume from text %s size %n"><l>A</l><block var="size"/></custom-block></block><block s="doReport"><block s="reportNewCostume"><block s="reportReshape"><l>0</l><block s="reportListAttribute"><l><option>dimensions</option></l><block s="reportGetImageAttribute"><l><option>pixels</option></l><block var="tmp"/></block></block></block><block s="reportGetImageAttribute"><l><option>width</option></l><block var="tmp"/></block><block s="reportGetImageAttribute"><l><option>height</option></l><block var="tmp"/></block></block></block></script><list></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>cst</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="setHeading"><l>90</l></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="write"><block var="text"/><block var="size"/></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="doSetVar"><l>costume</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="costume"/><block s="reportJoinWords"><list><block var="text"/></list></block></list></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="doIf"><block var="pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="costume"/></block></script></block-definition><block-definition s="costume %&apos;cst&apos; with background RGBA %&apos;rgb&apos; padding %&apos;padding&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:kostium _ z tłem RGBA _ rozmiar tła _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input><input type="%n">200</input><input type="%n">2</input></inputs><script><block s="doDeclareVariables"><list><l>old</l><l>clr</l><l>new</l><l>x</l><l>y</l><l>dir</l><l>trails</l><l>flat</l><l>old size</l><l>old pen state</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>old</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>clr</l><block s="getPenAttribute"><l><option>r-g-b-a</option></l></block></block><block s="doSetVar"><l>flat</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetVar"><l>old size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="doSetVar"><l>old pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportVariadicSum"><list><block s="reportQuotient"><block s="reportGetImageAttribute"><l><option>width</option></l><block var="cst"/></block><l>2</l></block><block var="padding"/></list></block></block><l>0</l></block><block s="setHeading"><l>90</l></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></block><block s="setSize"><block s="reportVariadicSum"><list><block s="reportGetImageAttribute"><l><option>height</option></l><block var="cst"/></block><block s="reportVariadicProduct"><list><block var="padding"/><l>2</l></list></block></list></block></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="rgb"/></block><block s="down"></block><block s="setXPosition"><block s="reportMonadic"><l><option>neg</option></l><block s="xPosition"></block></block></block><block s="up"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="doGotoObject"><l><option>center</option></l></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center x</option></l></block></block><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center y</option></l></block></block></block><block s="doStamp"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>new</l><block s="reportPenTrailsAsCostume"></block></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="new"/><block s="reportIfElse"><block s="reportListContainsItem"><block s="reportTextSplit"><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l><option>word</option></l></block><l>button</l></block><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><block s="reportJoinWords"><list><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l> button</l></list></block></block></list></block><block s="clear"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="old"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="clr"/></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat"/></block><block s="setSize"><block var="old size"/></block><block s="doIf"><block var="old pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="new"/></block></script><scripts><script x="255" y="186.19999999999993"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume from text %s size %n"><l>Snap!</l><l>36</l></custom-block><l>200</l><l>10</l></custom-block><l>100</l><l>2</l></custom-block></script><comment x="248.685546875" y="121.03333333333336" w="106" collapsed="false">Use this block to make &quot;clickable&quot; buttons:</comment></scripts></block-definition><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos;" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _&#xD;pt:fala _ na língua _ _ com tom _ e velocidade _&#xD;ca:digues _ amb accent _ _ to _ i velocitat _&#xD;pl:powiedz _ z akcentem _ _ wysokość _ szybkość _&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>العربية=ar&#xD;Български=bg&#xD;বাংলা=bn&#xD;Català=ca&#xD;Català - Valencià=ca-VA&#xD;Česky=cs&#xD;Deutsch=de&#xD;Dansk=dk&#xD;Ελληνικά=el&#xD;English-American=en-US&#xD;English-British=en-GB&#xD;Esperanto=eo&#xD;Español=es&#xD;Eesti=et&#xD;Euskara=eu&#xD;suomi=fi&#xD;Français=fr&#xD;Galego=gl&#xD;Hrvatski=hr&#xD;Magyar=hu&#xD;Interlingua=ia&#xD;Bahasa Indonesia=id&#xD;Italiano=it&#xD;日本語=ja&#xD;にほんご=ja-HIRA&#xD;ಕನ್ನಡ=kn&#xD;한국어=ko&#xD;Malayalam=ml&#xD;Nederlands=nl&#xD;Norsk=no&#xD;Polski=pl&#xD;Português=pt&#xD;Português do Brasil=pt-BR&#xD;Român=ro&#xD;Русский=ru&#xD;Slovenščina=si&#xD;svenska=sv&#xD;Tamil=ta&#xD;Telagu=te&#xD;Türkçe=tr&#xD;Українська=ua&#xD;简体中文=zh-CN&#xD;繁體中文=zh-TW</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doApplyExtension"><l>tts_speak(txt, lang, pitch, rate)</l><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></script></block-definition><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos; and wait" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _ und warte&#xD;pt:fala _ na língua _ _ com tom _ e velocidade _ , e espera&#xD;ca:digues _ amb accent _ _ to _ velocitat _ i espera&#xD;pl:powiedz _ z akcentem _ _ wysokość _ szybkość _ i czekaj&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>العربية=ar&#xD;Български=bg&#xD;বাংলা=bn&#xD;Català=ca&#xD;Català - Valencià=ca-VA&#xD;Česky=cs&#xD;Deutsch=de&#xD;Dansk=dk&#xD;Ελληνικά=el&#xD;English-American=en-US&#xD;English-British=en-GB&#xD;Esperanto=eo&#xD;Español=es&#xD;Eesti=et&#xD;Euskara=eu&#xD;suomi=fi&#xD;Français=fr&#xD;Galego=gl&#xD;Hrvatski=hr&#xD;Magyar=hu&#xD;Interlingua=ia&#xD;Bahasa Indonesia=id&#xD;Italiano=it&#xD;日本語=ja&#xD;にほんご=ja-HIRA&#xD;ಕನ್ನಡ=kn&#xD;한국어=ko&#xD;Malayalam=ml&#xD;Nederlands=nl&#xD;Norsk=no&#xD;Polski=pl&#xD;Português=pt&#xD;Português do Brasil=pt-BR&#xD;Român=ro&#xD;Русский=ru&#xD;Slovenščina=si&#xD;svenska=sv&#xD;Tamil=ta&#xD;Telagu=te&#xD;Türkçe=tr&#xD;Українська=ua&#xD;简体中文=zh-CN&#xD;繁體中文=zh-TW</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doDeclareVariables"><list><l>callback</l></list></block><block s="doSetVar"><l>callback</l><block s="reportApplyExtension"><l>tts_speak(txt, lang, pitch, rate)</l><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="callback"/><list></list></block></block></script></block-definition><block-definition s="recognize speech" type="reporter" category="sensing"><header></header><code></code><translations>de:erkenne Gesprochenes&#xD;ar:التعرف على الكلام&#xD;bg:Разпознаване на изговорени думи&#xD;hr:Prepoznavanje izgovorenih riječi&#xD;hy:ճանաչել ասված բառերը&#xD;ca:reconèixer les paraules pronunciades&#xD;cs:Rozpoznávání mluvených slov&#xD;dk:At genkende talte ord&#xD;eu:ahozko hitzak ezagutu&#xD;el:Αναγνώριση προφορικών λέξεων&#xD;es:Reconocer palabras habladas&#xD;fi:Puhuttujen sanojen tunnistaminen&#xD;fr:Reconnaître les mots parlés&#xD;he:זיהוי מילים מדוברות&#xD;hi:बोले गए शब्दों को पहचानना&#xD;hu:A kimondott szavak felismerése&#xD;it:Riconoscere le parole pronunciate&#xD;ja:話し言葉を認識する&#xD;ko:말한 단어 인식&#xD;no:Gjenkjenne talte ord&#xD;po:Rozpoznawanie wypowiedzianych słów&#xD;pt_BR:Reconhecendo palavras faladas&#xD;pt:Reconhecendo palavras faladas&#xD;ro:Recunoașterea cuvintelor rostite&#xD;ru:Распознавание произнесенных слов&#xD;sk:Rozpoznávanie hovorených slov&#xD;si:Prepoznavanje govorjenih besed&#xD;sv:Att känna igen talade ord&#xD;ti:ዝተዛረቡ ቃላት ምልላይ&#xD;tr:Konuşulan kelimeleri tanıma&#xD;ua:Розпізнавання вимовлених слів&#xD;zh_CN:识别口语单词&#xD;zh_TW:辨識口語單字&#xD;nl:gesproken woorden herkennen&#xD;et:ära tunda öeldud sõnu&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>tts_recognize</l><list></list></block></block></script></block-definition><block-definition s="-- %&apos;n&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%anyUE" readonly="true"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doChangeVar"><l></l><l>-1</l></block></script><list></list></block><list><block var="n"/></list></block><block s="doReport"><block s="evaluate"><block var="n"/><list></list></block></block></script></block-definition><block-definition s="animate setter %&apos;setter&apos; getter %&apos;getter&apos; delta %&apos;delta&apos; over %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="control"><header></header><code></code><translations>de:animiere Setter _ Getter _ Delta _ über _ Sek. beschleunigt _&#xD;ca:modifica setter _ i getter _ amb delta _ en _ segons de forma _&#xD;pt:anima com modificador _ e inspector _ de _ em _ s de forma _&#xD;pl:animuj setter _ getter _ delta _ przez _ s przyspieszając _&#xD;</translations><inputs><input type="%cmdRing"></input><input type="%repRing"></input><input type="%n">50</input><input type="%n">1</input><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>end time</l><l>destination</l></list></block><block s="doSetVar"><l>end time</l><block s="reportVariadicSum"><list><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportVariadicProduct"><list><block var="duration"/><l>1000</l></list></block></list></block></block><block s="doSetVar"><l>destination</l><block s="reportVariadicSum"><list><block s="evaluate"><block var="getter"/><list></list></block><block var="delta"/></list></block></block><block s="doUntil"><block s="reportVariadicGreaterThan"><list><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end time"/></list></block><script><block s="doRun"><block var="setter"/><list><block s="reportDifference"><block var="destination"/><block s="reportVariadicProduct"><list><block var="delta"/><block s="evaluate"><block var="easing"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportVariadicProduct"><list><block var="duration"/><l>1000</l></list></block></block></list></block></list></block></block></list></block></script></block><block s="doRun"><block var="setter"/><list><block var="destination"/></list></block></script></block-definition><block-definition s="PI" type="reporter" category="operators"><header></header><code></code><translations>pt:π&#xD;</translations><inputs></inputs><script><block s="doReport"><l>3.141592653589793</l></block></script></block-definition><block-definition s="degrees %&apos;radians&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:_ radianos em graus&#xD;ca:graus de _ radiants&#xD;pl:stopnie _&#xD;</translations><inputs><input type="%n">0.5</input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportVariadicProduct"><list><block var="radians"/><l>180</l></list></block><custom-block s="PI"></custom-block></block></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations>de:Fehler _&#xD;pt:assinala o erro _&#xD;pl:błąd _&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="msg"/></list></block></script></block-definition><block-definition s="glide %&apos;steps&apos; in %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="motion"><header></header><code></code><translations>de:gleite _ in _ Sek. beschleunigt: _&#xD;ca:llisca _ en _ segons de forma _&#xD;fr:glisser _ en _ sec. accélérer _&#xD;pt:desliza _ em _ s de forma _&#xD;pl:leć _ przez _ s przyspieszając _&#xD;</translations><inputs><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input></inputs><script><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reifyScript"><script><block s="doGotoObject"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getPosition"></block></autolambda><list></list></block><block s="reportVariadicProduct"><list><block var="steps"/><block s="reportNewList"><list><block s="reportMonadic"><l><option>sin</option></l><block s="direction"></block></block><block s="reportMonadic"><l><option>cos</option></l><block s="direction"></block></block></list></block></list></block><block var="duration"/><custom-block s="easing %txt"><block var="easing"/></custom-block></custom-block></script></block-definition><block-definition s="animate %&apos;attribute&apos; by %&apos;delta&apos; in %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="motion"><header></header><code></code><translations>de:animiere _ um _ in _ Sek. beschleunigt: _&#xD;ca:modifica _ amb _ en _ segons de forma _&#xD;pt:anima _ de _ em _ s de forma _&#xD;pl:animuj _ o _ przez _ s przyspieszając _&#xD;</translations><inputs><input type="%s" readonly="true">x position<options>steps&#xD;x position&#xD;y position&#xD;direction&#xD;size&#xD;ghost effect&#xD;color effect&#xD;saturation effect&#xD;brightness effect&#xD;fisheye effect&#xD;whirl effect&#xD;pixelate effect&#xD;mosaic effect&#xD;negative effect&#xD;tempo&#xD;volume&#xD;balance</options></input><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input></inputs><script><block s="doDeclareVariables"><list><l>accessors</l><l>func</l></list></block><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>steps</l></list></block><script><block s="doSetVar"><l>accessors</l><block s="reportNewList"><list><block s="reifyScript"><script><block s="doGotoObject"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getPosition"></block></autolambda><list></list></block></list></block></block><block s="doSetVar"><l>delta</l><block s="reportVariadicProduct"><list><block var="delta"/><block s="reportNewList"><list><block s="reportMonadic"><l><option>sin</option></l><block s="direction"></block></block><block s="reportMonadic"><l><option>cos</option></l><block s="direction"></block></block></list></block></list></block></block></script><script><block s="doSetVar"><l>accessors</l><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>x position</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setXPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="xPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>y position</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setYPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="yPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>direction</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setHeading"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="direction"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>size</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setScale"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getScale"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>tempo</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="doSetTempo"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getTempo"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>volume</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setVolume"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getVolume"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="attribute"/><l>balance</l></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setPan"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getPan"></block></autolambda><list></list></block></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block></block></autolambda><list></list></block></list></block></block></block></block></block></block></block></block></block></script></block><block s="doIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><script><block s="doSetVar"><l>func</l><block var="easing"/></block></script><script><block s="doSetVar"><l>func</l><custom-block s="easing %txt"><block var="easing"/></custom-block></block></script></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reportListItem"><l>1</l><block var="accessors"/></block><block s="reportListItem"><l>2</l><block var="accessors"/></block><block var="delta"/><block var="duration"/><block var="func"/></custom-block></script></block-definition><block-definition s="easing %&apos;choice&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:Beschleunigung _&#xD;ca:de forma _&#xD;pt:a forma _&#xD;pl:przyspieszenie _&#xD;</translations><inputs><input type="%txt" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;sigmoid&#xD;elastic</options></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="choice"/><l>linear</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportMonadic"><l><option>id</option></l><l></l></block></autolambda><list></list></block></block></script><list><block s="reportVariadicEquals"><list><block var="choice"/><l>quadratic-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>quadratic-in</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><block s="reportDifference"><l>2</l><l></l></block></list></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>quadratic-in-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicLessThan"><list><l></l><l>.5</l></list></block><block s="reportVariadicProduct"><list><l>2</l><block s="reportVariadicProduct"><list><l></l><l></l></list></block></list></block><block s="reportDifference"><block s="reportVariadicProduct"><list><block s="reportDifference"><l>4</l><block s="reportVariadicProduct"><list><l>2</l><l></l></list></block></block><l></l></list></block><l>1</l></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>cubic-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><l></l></list></block></list></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>cubic-in</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><block s="reportVariadicProduct"><list><custom-block s="-- %anyUE"><block var="t"/></custom-block><block var="t"/></list></block><block var="t"/></list></block><l>1</l></list></block></autolambda><list><l>t</l></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>cubic-in-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicLessThan"><list><l></l><l>.5</l></list></block><block s="reportVariadicProduct"><list><l>4</l><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><l></l></list></block></list></block></list></block><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><block s="reportVariadicProduct"><list><block s="reportDifference"><l></l><l>1</l></block><block s="reportDifference"><block s="reportVariadicProduct"><list><l>2</l><l></l></list></block><l>2</l></block></list></block><block s="reportDifference"><block s="reportVariadicProduct"><list><l>2</l><l></l></list></block><l>2</l></block></list></block><l>1</l></list></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>quart-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><l></l></list></block></list></block></list></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>quart-in</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportVariadicProduct"><list><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportVariadicProduct"><list><block var="t"/><block s="reportVariadicProduct"><list><block var="t"/><block var="t"/></list></block></list></block></list></block></block></autolambda><list><l>t</l></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>quart-in-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicLessThan"><list><l></l><l>.5</l></list></block><block s="reportVariadicProduct"><list><l>8</l><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><block s="reportVariadicProduct"><list><l></l><l></l></list></block></list></block></list></block></list></block><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportVariadicProduct"><list><l>8</l><block s="reportVariadicProduct"><list><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportVariadicProduct"><list><block var="t"/><block s="reportVariadicProduct"><list><block var="t"/><block var="t"/></list></block></list></block></list></block></list></block></block></autolambda><list><l>t</l></list></block><list><l></l></list></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>sine-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>sin</option></l><block s="reportVariadicSum"><list><l>90</l><block s="reportVariadicProduct"><list><l></l><l>90</l></list></block></list></block></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>sine-in</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportMonadic"><l><option>sin</option></l><block s="reportVariadicProduct"><list><l></l><l>90</l></list></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>sine-in-out</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportQuotient"><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>cos</option></l><block s="reportVariadicProduct"><list><l></l><l>180</l></list></block></block></block><l>2</l></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>sigmoid</l></list></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l>1</l><block s="reportVariadicSum"><list><l>1</l><block s="reportMonadic"><l><option>e^</option></l><block s="reportMonadic"><l><option>neg</option></l><block s="reportDifference"><block s="reportVariadicProduct"><list><l></l><l>20</l></list></block><l>10</l></block></block></block></list></block></block></autolambda><list></list></block></block></script><block s="reportVariadicEquals"><list><block var="choice"/><l>elastic</l></list></block><script><block s="doReport"><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>p</l></list></block><block s="doSetVar"><l>p</l><l>0.3</l></block><block s="doReport"><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><block s="reportPower"><l>2</l><block s="reportVariadicProduct"><list><l>-10</l><l></l></list></block></block><block s="reportMonadic"><l><option>sin</option></l><custom-block s="degrees %n"><block s="reportVariadicProduct"><list><block s="reportDifference"><l></l><block s="reportQuotient"><block var="p"/><l>4</l></block></block><block s="reportQuotient"><block s="reportVariadicProduct"><list><l>2</l><custom-block s="PI"></custom-block></list></block><block var="p"/></block></list></block></custom-block></block></list></block><l>1</l></list></block></block></script><list></list></block></block></script></list></block><custom-block s="error %s"><block s="reportJoinWords"><list><l>unknown easing function "</l><block var="choice"/><l>"</l></list></block></custom-block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; $nl in %&apos;time&apos; secs easing %&apos;easing&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:für _ = _ bis _ _ in _ Sek. beschleunigt: _ _&#xD;ca:per _ = _ fins _ _ en _ segons de forma _ _&#xD;pt:para _ de _ a _ _ em _ s de forma _ _&#xD;pl:dla _ = _ do _ _ przez _ s przyspieszając _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">0</input><input type="%n">100</input><input type="%n">1</input><input type="%txt" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input><input type="%ca"></input></inputs><script><block s="doSetVar"><l>i</l><block var="start"/></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reifyScript"><script><block s="doSetVar"><l>i</l><l></l></block><block s="doRun"><block var="action"/><list></list></block></script><list></list></block><block s="reifyReporter"><autolambda><block var="i"/></autolambda><list></list></block><block s="reportDifference"><block var="end"/><block var="start"/></block><block var="time"/><block s="reportIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><block var="easing"/><custom-block s="easing %txt"><block var="easing"/></custom-block></block></custom-block></script></block-definition><block-definition s="export costume %&apos;costume&apos;" type="command" category="looks"><header></header><code></code><translations>pl:eksportuj kostium _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input></inputs><script><block s="doSetVar"><l>costume</l><block s="reportIfElse"><block s="reportIsA"><block var="costume"/><l><option>costume</option></l></block><block var="costume"/><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportGetImageAttribute"><l><option>name</option></l><l></l></block><block var="costume"/></list></block></autolambda><list></list></block><block s="reportGet"><l><option>costumes</option></l></block></block></block></block><block s="doIf"><block s="reportIsA"><block var="costume"/><l><option>costume</option></l></block><script><block s="doApplyExtension"><l>cst_export(cst, name)</l><list><block var="costume"/><l></l></list></block></script><list></list></block></script></block-definition><block-definition s="set name of costume %&apos;costume&apos; to %&apos;name&apos;" type="command" category="looks"><header></header><code></code><translations>pl:ustaw nazwę kostiumu _ na _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input><input type="%s">thing</input></inputs><script><block s="doSetVar"><l>costume</l><block s="reportIfElse"><block s="reportIsA"><block var="costume"/><l><option>costume</option></l></block><block var="costume"/><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportGetImageAttribute"><l><option>name</option></l><l></l></block><block var="costume"/></list></block></autolambda><list></list></block><block s="reportGet"><l><option>costumes</option></l></block></block></block></block><block s="doIf"><block s="reportIsA"><block var="costume"/><l><option>costume</option></l></block><script><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="costume"/><block var="name"/></list></block></script><list></list></block></script></block-definition><block-definition s="$camera snap" type="reporter" category="sensing"><comment x="0" y="0" w="216" collapsed="false">takes a snapshot with the webcam and reports it as a new costume, or zero if the user cancels</comment><header></header><code></code><translations>pt:$camera a imagem actual do vídeo&#xD;pl:$camera zdjęcie&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>callback</l><l>pic</l></list></block><block s="doSetVar"><l>callback</l><block s="reportApplyExtension"><l>mda_snap</l><list></list></block></block><block s="doWaitUntil"><block s="evaluate"><block s="reifyScript"><script><block s="doSetVar"><l>pic</l><block s="evaluate"><block var="callback"/><list></list></block></block><block s="doReport"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="pic"/><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></block></script><list></list></block><list></list></block></block><block s="doReport"><block var="pic"/></block></script></block-definition><block-definition s="export costume list %&apos;costumes&apos; base name %&apos;name&apos;" type="command" category="looks"><header></header><code></code><translations>pl:eksportuj listę kostiumu _ nazwa _&#xD;</translations><inputs><input type="%l"></input><input type="%s">frame</input></inputs><script><block s="doDeclareVariables"><list><l>count</l></list></block><block s="doSetVar"><l>count</l><block s="reportListAttribute"><l><option>length</option></l><block var="costumes"/></block></block><block s="doForEach"><l>item</l><block s="reportListAttribute"><l><option>reverse</option></l><block var="costumes"/></block><script><block s="doApplyExtension"><l>cst_export(cst, name)</l><list><block var="item"/><block s="reportJoinWords"><list><block var="name"/><l> (</l><block var="count"/><l>)</l></list></block></list></block><block s="doChangeVar"><l>count</l><l>-1</l></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportModulus"><block var="count"/><l>10</l></block><l>0</l></list></block><script><block s="doWait"><l>1</l></block></script><list></list></block></script></block></script></block-definition><block-definition s="grayscales of %&apos;costume&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:_ w skali szarości&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input></inputs><script><block s="doReport"><block s="reportReshape"><block s="reportVariadicSum"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportVariadicProduct"><list><block s="reportGetImageAttribute"><l><option>pixels</option></l><block var="costume"/></block><block s="reportNewList"><list><l>.3</l><l>.6</l><l>.1</l></list></block></list></block></block></block><list><block s="reportGetImageAttribute"><l><option>height</option></l><block var="costume"/></block><block s="reportGetImageAttribute"><l><option>width</option></l><block var="costume"/></block></list></block></block></script></block-definition><block-definition s="%&apos;filter&apos; filter on %&apos;costume&apos; alpha %&apos;alpha&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:filtr _ na _ kanał alfa _&#xD;</translations><inputs><input type="%s" readonly="true">blur<options>blur&#xD;sharpen&#xD;outline&#xD;emboss&#xD;edge={&#xD;left&#xD;right&#xD;top&#xD;bottom&#xD;}&#xD;Gauss</options></input><input type="%s" readonly="true">current<options>§_costumesMenu</options></input><input type="%b">true</input></inputs><script><block s="doDeclareVariables"><list><l>kernel</l><l>pixels</l><l>channels</l></list></block><block s="doSetVar"><l>kernel</l><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>rank</option></l><block var="filter"/></block><l>1</l></list></block><block var="filter"/><custom-block s="filter %s"><block var="filter"/></custom-block></block></block><block s="doSetVar"><l>pixels</l><block s="reportGetImageAttribute"><l><option>pixels</option></l><block var="costume"/></block></block><block s="doIf"><block var="alpha"/><script><block s="doSetVar"><l>channels</l><l>4</l></block></script><list><l><bool>true</bool></l><script><block s="doSetVar"><l>channels</l><l>3</l></block><block s="doSetVar"><l>pixels</l><block s="reportVariadicProduct"><list><block var="pixels"/><block s="reportNewList"><list><l>1</l><l>1</l><l>1</l></list></block></list></block><comment w="137" collapsed="true">remove alpha channel</comment></block></script></list></block><block s="doReport"><block s="reportNewCostume"><custom-block s="convolve matrix %l * kernel %l"><block s="reportReshape"><block var="pixels"/><list><block s="reportGetImageAttribute"><l><option>height</option></l><block var="costume"/></block><block s="reportGetImageAttribute"><l><option>width</option></l><block var="costume"/></block><block var="channels"/></list></block><block var="kernel"/></custom-block><l></l><l></l></block></block></script></block-definition><block-definition s="filter %&apos;name&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:filtr _&#xD;</translations><inputs><input type="%s" readonly="true">blur<options>blur&#xD;sharpen&#xD;outline&#xD;emboss&#xD;edge={&#xD;left&#xD;right&#xD;top&#xD;bottom&#xD;}&#xD;Gauss</options></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="name"/><l>sharpen</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>0</l><l>-1</l><l>0</l><l>-1</l><l>5</l><l>-1</l><l>0</l><l>-1</l><l>0</l></custom-block></block></script><list><block s="reportVariadicEquals"><list><block var="name"/><l>outline</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>-1</l><l>-1</l><l>-1</l><l>-1</l><l>8</l><l>-1</l><l>-1</l><l>-1</l><l>-1</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>emboss</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>-2</l><l>-1</l><l>0</l><l>-1</l><l>1</l><l>1</l><l>0</l><l>1</l><l>2</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>left</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>-1</l><l>0</l><l>1</l><l>-2</l><l>0</l><l>2</l><l>-1</l><l>0</l><l>1</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>right</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>1</l><l>0</l><l>-1</l><l>2</l><l>0</l><l>-2</l><l>1</l><l>0</l><l>-1</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>top</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>-1</l><l>-2</l><l>-1</l><l>0</l><l>0</l><l>0</l><l>1</l><l>2</l><l>1</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>bottom</l></list></block><script><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>1</l><l>2</l><l>1</l><l>0</l><l>0</l><l>0</l><l>-1</l><l>-2</l><l>-1</l></custom-block></block></script><block s="reportVariadicEquals"><list><block var="name"/><l>gauss</l></list></block><script><block s="doReport"><block s="reportQuotient"><block s="reportNewList"><list><block s="reportNewList"><list><l>1</l><l>4</l><l>7</l><l>4</l><l>1</l></list></block><block s="reportNewList"><list><l>4</l><l>16</l><l>26</l><l>16</l><l>4</l></list></block><block s="reportNewList"><list><l>7</l><l>26</l><l>41</l><l>26</l><l>7</l></list></block><block s="reportNewList"><list><l>4</l><l>16</l><l>26</l><l>16</l><l>4</l></list></block><block s="reportNewList"><list><l>1</l><l>4</l><l>7</l><l>4</l><l>1</l></list></block></list></block><l>273</l></block></block></script></list></block><block s="doReport"><custom-block s="kernel %br %n %n %n %br %n %n %n %br %n %n %n"><l>0.0625</l><l>0.125</l><l>0.0625</l><l>0.125</l><l>0.25</l><l>0.125</l><l>0.0625</l><l>0.125</l><l>0.0625</l><comment w="80" collapsed="false">blur</comment></custom-block></block></script></block-definition><block-definition s="rectangle costume %&apos;color&apos; width: %&apos;w&apos; height: %&apos;h&apos;" type="reporter" category="looks"><comment x="0" y="0" w="204.00000000000023" collapsed="false">make a rectangle costume with the given color, width and height. The color can be either specified by the color picker from the input slot, or it can be a list of r-g-b-a values.</comment><header></header><code></code><translations>pl:prostokątny kostium _ szerokość: _ wysokość: _&#xD;</translations><inputs><input type="%clr"></input><input type="%n">20</input><input type="%n">60</input></inputs><script><block s="doIf"><block s="reportIsA"><block var="color"/><l><option>list</option></l></block><script><block s="doSetVar"><l>color</l><block s="reportApplyExtension"><l>clr_rgba(r, g, b, a)</l><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="color"/></block><l>4</l></list></block><block s="reportConcatenatedLists"><list><block s="reportReshape"><block var="color"/><list><l>3</l></list></block><block s="reportNewList"><list><l>255</l></list></block></list></block><block s="reportReshape"><block var="color"/><list><l>4</l></list></block></block></block></block></script><list></list></block><block s="doReport"><block s="reportNewCostume"><block s="reportReshape"><block s="reportVariadicProduct"><list><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportApplyExtension"><l>clr_channel(clr, rgba)</l><list><block var="color"/><l></l></list></block></autolambda><list></list></block><block s="reportNewList"><list><l>r</l><l>g</l><l>b</l><l>a</l></list></block></block><block s="reportNewList"><list><l>1</l><l>1</l><l>1</l><l>255</l></list></block></list></block><list><block s="reportVariadicProduct"><list><block s="reportVariadicMax"><list><block s="reportMonadic"><l><option>abs</option></l><block var="h"/></block><l>1</l></list></block><block s="reportVariadicMax"><list><block s="reportMonadic"><l><option>abs</option></l><block var="w"/></block><l>1</l></list></block></list></block><l>4</l></list></block><block s="reportVariadicMax"><list><block s="reportMonadic"><l><option>abs</option></l><block var="w"/></block><l>1</l></list></block><block s="reportVariadicMax"><list><block s="reportMonadic"><l><option>abs</option></l><block var="h"/></block><l>1</l></list></block></block></block></script></block-definition><block-definition s="kernel $nl %&apos;a1&apos; %&apos;b1&apos; %&apos;c1&apos; $nl %&apos;a2&apos; %&apos;b2&apos; %&apos;c2&apos; $nl %&apos;a3&apos; %&apos;b3&apos; %&apos;c3&apos;" type="reporter" category="lists"><header></header><code></code><translations>pl:jądro _ _ _ _ _ _ _ _ _ _ _ _&#xD;</translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportReshape"><block s="reportEnvironment"><l><option>inputs</option></l></block><list><l>3</l><l>3</l></list></block></block></script></block-definition><block-definition s="convolve matrix %&apos;matrix&apos; * kernel %&apos;kernel&apos;" type="reporter" category="operators"><header></header><code></code><translations>pl:przemnóż macierz _ * jądro _&#xD;</translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>padding</l><l>channels</l><l>every coordinate</l><l>channel indices</l></list></block><block s="doSetVar"><l>padding</l><block s="reportQuotient"><block s="reportDifference"><block s="reportListItem"><block s="reportNewList"><list><l>1</l><l>2</l></list></block><block s="reportListAttribute"><l><option>dimensions</option></l><block var="kernel"/></block></block><l>1</l></block><l>2</l></block><comment w="119" collapsed="false">assume odd dimensions, typically 3x3 or 5x5</comment></block><block s="doSetVar"><l>channels</l><block s="reportListItem"><l>3</l><block s="reportListAttribute"><l><option>dimensions</option></l><block var="matrix"/></block></block></block><block s="doSetVar"><l>every coordinate</l><block s="reportCrossproduct"><block s="reportNumbers"><l>1</l><block s="reportListItem"><block s="reportNewList"><list><l>1</l><l>2</l></list></block><block s="reportListAttribute"><l><option>dimensions</option></l><block var="matrix"/></block></block></block></block></block><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block var="channels"/><l>0</l></list></block><script><block s="doSetVar"><l>channel indices</l><block s="reportNewList"><list><block s="reportReshape"><block s="reportNumbers"><l>1</l><block var="channels"/></block><list><block s="reportListAttribute"><l><option>length</option></l><block var="every coordinate"/></block><block var="channels"/></list></block></list></block></block><block s="doIf"><block s="reportVariadicLessThan"><list><block s="reportListAttribute"><l><option>dimensions</option></l><block var="kernel"/></block><l>3</l></list></block><script><block s="doSetVar"><l>kernel</l><block s="reportReshape"><custom-block s="stretch %l by %n"><block s="reportListAttribute"><l><option>flatten</option></l><block var="kernel"/></block><block var="channels"/></custom-block><block s="reportConcatenatedLists"><list><block s="reportListAttribute"><l><option>dimensions</option></l><block var="kernel"/></block><block s="reportNewList"><list><block var="channels"/></list></block></list></block></block></block></script><list></list><comment w="90" collapsed="false">reshape the kernel to match the input matrix&apos;s channels, if any</comment></block></script><script><block s="doSetVar"><l>channel indices</l><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportReshape"><block s="reportVariadicSum"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportVariadicSum"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportVariadicProduct"><list><block s="reportListItem"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportConcatenatedLists"><list><block s="reportListAttribute"><l><option>columns</option></l><block s="reportNumbers"><block s="reportDifference"><block var="every coordinate"/><block var="padding"/></block><block s="reportVariadicSum"><list><block var="every coordinate"/><block var="padding"/></list></block></block></block><block var="channel indices"/></list></block></block><block var="matrix"/></block><block var="kernel"/></list></block></block></block></block></block><block s="reportListAttribute"><l><option>dimensions</option></l><block var="matrix"/></block><comment w="80" collapsed="false">for every padded pixel create a partial copy of the input, item-multiply it with the kernel and take its overall sum (∑)</comment></block></block></script></block-definition><block-definition s="stretch %&apos;data&apos; by %&apos;factor&apos;" type="reporter" category="lists"><header></header><code></code><translations>pl:rozciągnij _ o _&#xD;de:strecke _ um _&#xD;</translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportListItem"><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportQuotient"><block s="reportNumbers"><l>1</l><block s="reportVariadicProduct"><list><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><block var="factor"/></list></block></block><block var="factor"/></block></block><block var="data"/></block></block></script></block-definition><block-definition s="compress %&apos;data&apos; by %&apos;factor&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:stauche _ um _&#xD;</translations><inputs><input type="%l" initial="1"></input><input type="%n" initial="1"></input></inputs><script><block s="doReport"><custom-block s="stretch %l by %n"><block var="data"/><block s="reportQuotient"><l>1</l><block var="factor"/></block></custom-block></block></script></block-definition><block-definition s="outline color: %&apos;clr&apos; width: %&apos;w&apos;" type="reporter" category="looks"><header></header><code></code><translations></translations><inputs><input type="%clr" initial="1">5</input><input type="%n" initial="1">5</input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>padding</l><l>color</l><l>halo</l><l>empty</l></list></block><block s="doSetVar"><l>padding</l><block var="w"/></block><block s="doSetVar"><l>empty</l><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l><l>0</l></list></block></block><block s="doSetVar"><l>color</l><block s="reportVariadicProduct"><list><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportApplyExtension"><l>clr_channel(clr, rgba)</l><list><block var="clr"/><l></l></list></block></autolambda><list></list></block><block s="reportNewList"><list><l>r</l><l>g</l><l>b</l><l>a</l></list></block></block><block s="reportNewList"><list><l>1</l><l>1</l><l>1</l><l>255</l></list></block></list></block></block><block s="doSetVar"><l>costume</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="clear"></block><block s="doSwitchToCostume"><block s="reportNewCostume"><block s="reportReshape"><l>0</l><block s="reportVariadicSum"><list><block s="reportNewList"><list><block s="reportGetImageAttribute"><l><option>height</option></l><l><option>current</option></l></block><block s="reportGetImageAttribute"><l><option>width</option></l><l><option>current</option></l></block></list></block><block s="reportVariadicProduct"><list><block var="padding"/><l>2</l></list></block></list></block></block><l></l><l></l></block></block><block s="doTellTo"><block s="newClone"><l><option>myself</option></l></block><block s="reifyScript"><script><block s="doSwitchToCostume"><block var="costume"/></block><block s="doSetVar"><l><option>my rotation style</option></l><l>0</l></block><block s="doWarp"><script><block s="doRepeat"><l>36</l><script><block s="forward"><block var="padding"/></block><block s="doPasteOn"><l></l></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block var="padding"/></block></block><block s="turn"><l>10</l></block></script></block></script></block><block s="doCutFrom"><l></l></block><block s="removeClone"></block></script><list></list></block><list><block s="reportGet"><l><option>self</option></l></block></list></block><block s="doSwitchToCostume"><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><block s="reportListAttribute"><l><option>columns</option></l><block s="reportGetImageAttribute"><l><option>pixels</option></l><l><option>current</option></l></block></block></block><l>1</l></list></block><block var="empty"/><block var="color"/></block></block><block s="doSetVar"><l>halo</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSwitchToCostume"><block var="costume"/></block><block s="doReport"><block var="halo"/></block></script></block-definition><block-definition s="halo color: %&apos;clr&apos; width: %&apos;w&apos; while %&apos;test&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%clr" initial="1">2</input><input type="%n" initial="1">5</input><input type="%boolUE" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>halo</l></list></block><block s="doSetVar"><l>costume</l><custom-block s="outline color: %clr width: %n"><block var="clr"/><block var="w"/></custom-block></block><block s="doSetVar"><l>halo</l><block s="newClone"><l><option>Turtle sprite</option></l></block></block><block s="doTellTo"><block var="halo"/><block s="reifyScript"><script><block s="doSwitchToCostume"><block var="costume"/></block><block s="doSetVar"><l><option>my anchor</option></l><l></l></block></script><list></list></block><list><block s="reportGet"><l><option>self</option></l></block></list></block><block s="doWaitUntil"><block s="reportNot"><block s="evaluate"><block var="test"/><list></list></block></block></block><block s="doTellTo"><block var="halo"/><block s="reifyScript"><script><block s="removeClone"></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="halo color: %&apos;clr&apos; width: %&apos;w&apos; for %&apos;time&apos; secs" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%clr" initial="1">2</input><input type="%n" initial="1">5</input><input type="%n" initial="1">2</input></inputs><script><block s="doDeclareVariables"><list><l>end</l></list></block><block s="doSetVar"><l>end</l><block s="reportVariadicSum"><list><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportVariadicProduct"><list><block var="time"/><l>1000</l></list></block></list></block></block><custom-block s="halo color: %clr width: %n while %boolUE"><block var="clr"/><block var="w"/><block s="reportVariadicLessThan"><list><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end"/></list></block></custom-block></script></block-definition><block-definition s="turbo %&apos;action&apos;" type="command" category="other"><header></header><code></code><translations>pt:executa no modo turbo _&#xD;</translations><inputs><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>begin</l></list></block><block s="doSetVar"><l>begin</l><block s="reportGlobalFlag"><l><option>turbo mode</option></l></block></block><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>true</bool></l></block><block s="doRun"><block var="action"/><list></list></block><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><block var="begin"/></block></script></block-definition><block-definition s="%&apos;frequency&apos; Hz for %&apos;duration&apos; secs at %&apos;sample rate&apos; Hz sample rate" type="reporter" category="sound"><header></header><code></code><translations>pt:as amostras de som com _ Hz de _ s amostrado a _ Hz&#xD;ca:_ Hz durant _ segons amb mostreig de _ Hz&#xD;pl:_ Hz przez _ s przy częstotliwości _ Hz&#xD;</translations><inputs><input type="%n">440<options>a 55=55&#xD;a 110=110&#xD;a 220=220&#xD;a 440=440&#xD;a 880=880&#xD;a 1760=1760&#xD;a 3520=3520</options></input><input type="%n">1</input><input type="%n">44100<options>22.05 kHz=22050&#xD;44.1 kHz=44100&#xD;88.2 kHz=88200&#xD;96 kHz=96000</options></input></inputs><script><block s="doReport"><block s="reportMonadic"><l><option>sin</option></l><custom-block s="degrees %n"><block s="reportVariadicProduct"><list><l>2</l><custom-block s="PI"></custom-block><block var="frequency"/><block s="reportQuotient"><block s="reportNumbers"><l>1</l><block s="reportVariadicProduct"><list><block var="duration"/><block var="sample rate"/></list></block></block><block var="sample rate"/></block></list></block></custom-block></block></block></script></block-definition><block-definition s="sound named %&apos;name&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:o som _&#xD;ca:so de nom _&#xD;pl:dźwięk o nazwie _&#xD;</translations><inputs><input type="%s"><options>§_soundsMenu</options></input></inputs><script><block s="doReport"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportGetSoundAttribute"><l><option>name</option></l><l></l></block><block var="name"/></list></block></autolambda><list></list></block><block s="reportGet"><l><option>sounds</option></l></block></block></block></script></block-definition><block-definition s="plot sound %&apos;name&apos;" type="command" category="pen"><comment x="0" y="0" w="164" collapsed="false">quickly plot the samples of a sound, a list of samples (single channel), or a list of lists (multiple channels) to the stage at a lower resolution.</comment><header></header><code></code><translations>pt:desenha o gráfico do som _&#xD;ca:dibuixa el so _&#xD;pl:wykres dźwięku _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_soundsMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>samples</l><l>step</l><l>offset</l><l>i</l><l>sound</l></list></block><block s="doSetVar"><l>sound</l><block s="reportIfElse"><block s="reportVariadicOr"><list><block s="reportIsA"><block var="name"/><l><option>list</option></l></block><block s="reportIsA"><block var="name"/><l><option>sound</option></l></block></list></block><block var="name"/><custom-block s="sound named %s"><block var="name"/></custom-block></block></block><block s="doIfElse"><block s="reportIsA"><block var="sound"/><l><option>sound</option></l></block><script><block s="doSetVar"><l>samples</l><block s="reportGetSoundAttribute"><l><option>samples</option></l><block var="sound"/></block></block><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportGetSoundAttribute"><l><option>length</option></l><block var="sound"/></block><block s="reportVariadicProduct"><list><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></list></block></block></block></script><script><block s="doSetVar"><l>samples</l><block var="sound"/></block></script></block><block s="clear"></block><block s="up"></block><block s="doIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="samples"/></block><l><option>list</option></l></block><script><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportListAttribute"><l><option>length</option></l><block s="reportListItem"><l>1</l><block var="samples"/></block></block><block s="reportVariadicProduct"><list><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></list></block></block></block><block s="doSetVar"><l>offset</l><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>4</l></block></block><block s="doForEach"><l>channel</l><block var="samples"/><script><block s="doSetVar"><l>i</l><l>0</l></block><block s="gotoXY"><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>-2</l></block><block var="offset"/></block><block s="down"></block><block s="setSize"><l>1</l></block><custom-block s="turbo %cs"><script><block s="doRepeat"><block s="reportVariadicProduct"><list><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></list></block><script><block s="doChangeVar"><l>i</l><block var="step"/></block><block s="gotoXY"><block s="reportVariadicSum"><list><block s="xPosition"></block><l>0.5</l></list></block><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><block s="reportListItem"><block s="reportMonadic"><l><option>floor</option></l><block var="i"/></block><block var="channel"/></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>6.4</l></block></list></block><block var="offset"/></list></block></block></script></block></script></custom-block><block s="up"></block><block s="doChangeVar"><l>offset</l><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>-2</l></block></block></script></block></script><script><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportListAttribute"><l><option>length</option></l><block var="samples"/></block><block s="reportVariadicProduct"><list><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></list></block></block></block><block s="gotoXY"><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>-2</l></block><l>0</l></block><block s="down"></block><block s="setSize"><l>1</l></block><custom-block s="turbo %cs"><script><block s="doRepeat"><block s="reportVariadicProduct"><list><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></list></block><script><block s="doChangeVar"><l>i</l><block var="step"/></block><block s="gotoXY"><block s="reportVariadicSum"><list><block s="xPosition"></block><l>0.5</l></list></block><block s="reportVariadicProduct"><list><block s="reportListItem"><block s="reportMonadic"><l><option>floor</option></l><block var="i"/></block><block var="samples"/></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>3.2</l></block></list></block></block></script></block></script></custom-block><block s="up"></block></script></block></script></block-definition><block-definition s="$circleSolid-1-255-0-0 record" type="reporter" category="sensing"><comment x="0" y="0" w="192" collapsed="false">records an audio snippet and reports it as a new sound, or zero if the user cancels</comment><header></header><code></code><translations>pt:$circleSolid-1-255-0-0 uma nova gravação&#xD;ca:$circleSolid-1-255-0-0 enregistra&#xD;pl:$circleSolid-1-255-0-0 nagranie&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>callback</l></list></block><block s="doSetVar"><l>callback</l><block s="reportApplyExtension"><l>mda_record</l><list></list></block></block><block s="doWaitUntil"><block s="reportVariadicNotEquals"><list><block s="evaluate"><block var="callback"/><list></list></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block><block s="doReport"><block s="evaluate"><block var="callback"/><list></list></block></block></script></block-definition><block-definition s="note from %&apos;pitch&apos; hz" type="reporter" category="sound"><header></header><code></code><translations>pt:a nota com _ Hz&#xD;ca:nota de _ Hz&#xD;pl:nuta z _ Hz&#xD;</translations><inputs><input type="%n">440</input></inputs><script><block s="doReport"><block s="reportRound"><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><l>12</l><block s="reportQuotient"><block s="reportMonadic"><l><option>log</option></l><block s="reportQuotient"><block var="pitch"/><l>440</l></block></block><block s="reportMonadic"><l><option>log</option></l><l>2</l></block></block></list></block><l>69</l></list></block></block></block></script></block-definition><block-definition s="hz from note %&apos;note&apos;" type="reporter" category="sound"><header></header><code></code><translations>pt:a frequência da nota _&#xD;ca:freqüència (hz) de la nota _&#xD;pl:częstotliwość z nuty _&#xD;</translations><inputs><input type="%n">69</input></inputs><script><block s="doReport"><block s="reportVariadicProduct"><list><l>440</l><block s="reportPower"><l>2</l><block s="reportQuotient"><block s="reportDifference"><block var="note"/><l>69</l></block><l>12</l></block></block></list></block></block></script></block-definition><block-definition s="name of note %&apos;note&apos;" type="reporter" category="sound"><header></header><code></code><translations>pt:o nome da nota _&#xD;ca:nom de la nota _&#xD;pl:nazwa nuty _&#xD;</translations><inputs><input type="%n">69</input></inputs><script><block s="doReport"><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportModulus"><block s="reportDifference"><block var="note"/><l>69</l></block><l>12</l></block><l>1</l></list></block><block s="reportNewList"><list><l>A</l><l>Bb</l><l>B</l><l>C</l><l>C#</l><l>D</l><l>D#</l><l>E</l><l>F</l><l>F#</l><l>G</l><l>G#</l></list></block></block></block></script></block-definition><block-definition s="fade in %&apos;samples&apos; for %&apos;count&apos;" type="reporter" category="sound"><header></header><code></code><translations>pl:zanikanie _ przez _&#xD;</translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportVariadicProduct"><list><block var="samples"/><block s="reportConcatenatedLists"><list><block s="reportQuotient"><block s="reportNumbers"><l>0</l><block var="count"/></block><block var="count"/></block><block s="reportReshape"><block s="reportMonadic"><l><option>id</option></l><l>1</l></block><list><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block var="samples"/></block><block var="count"/></block></list></block></list></block></list></block></block></script></block-definition><block-definition s="$flash analyze %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="149" collapsed="false">returns a frequency analysis of the argument list, represented as a two-column table, where the first column contains the unique values and the second column their occurrences</comment><header></header><code></code><translations>pt:$flash as frequências dos itens de _&#xD;ca:$flash analitza _&#xD;pl:$flash analizuj _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>dta_analyze(list)</l><list><block var="data"/></list></block></block></script></block-definition><block-definition s="$flash group %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o agrupamento dos itens de _ de acordo com _&#xD;ca:$flash agrupa _ per _&#xD;pl:$flash grupuj _ według _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>dta_group(list, fn)</l><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:uma ordenação de _ com critério _&#xD;ca:$flash ordena _ per _&#xD;pl:$flash sortuj _ według _&#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="fn"/></list></block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ entre _ e _ com intervalo _&#xD;ca:histograma de _ des de: _ fins: _ interval: _&#xD;pl:wykres _ od: _ do: _ odstęp: _&#xD;</translations><inputs><input type="%l"></input><input type="%n"></input><input type="%n"></input><input type="%n">1</input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash analyze %l"><block var="data"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><block var="interval"/></list></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; grouped by: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ agrupado de acordo com _ entre _ e _ com passo _&#xD;ca:histograma de _ agrupat per: _ des de: _ fins: _ interval: _&#xD;pl:wykres _ pogrupowany według: _ od: _ do: _ odstęp: _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash group %l by %repRing"><block var="data"/><block var="key"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block var="interval"/><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l><block s="reportNewList"><list></list></block></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="fill %&apos;data&apos; key: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos; with: %&apos;generator&apos;" type="reporter" category="lists"><comment x="0" y="0" w="103" collapsed="false">add missing entries to a sorted list. Used for histograms</comment><header></header><code></code><translations>pt:os itens de _ com a chave _ entre _ e _ com passo _ completados por _&#xD;ca:omple _ clau: _ des de: _ fins: _ interval: _ amplada: _&#xD;pl:wypełnij _ klucz: _ od: _ do: _ odstęp: _ z: _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doIf"><block s="reportVariadicGreaterThan"><list><block var="floor"/><block var="ceiling"/></list></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="data"/><block s="reportNewList"><list></list></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicLessThan"><list><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></list></block><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block var="floor"/><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block-definition><block-definition s="%&apos;text&apos; $arrowRight lower case" type="reporter" category="operators"><header></header><code></code><translations>pt:_ em minúsculas&#xD;ca:_ $arrowRight minúscules&#xD;pl:_ $arrowRight małe litery&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>txt_lowercase(txt)</l><list><block var="text"/></list></block></block></script></block-definition><block-definition s="plot %&apos;data&apos; %&apos;style&apos; at x: %&apos;left&apos; y: %&apos;bottom&apos; width: %&apos;width&apos; height: %&apos;height&apos;" type="command" category="pen"><header></header><code></code><translations>pt:desenha gráfico de barras de _ em (x: _ , y: _ ) com largura _ e altura _&#xD;ca:dibuixa _ _ a x: _ y: _ i ample: _ alçada: _&#xD;pl:wykres _ _ x: _ y: _ szerokość: _ wysokość: _&#xD;</translations><inputs><input type="%l"></input><input type="%s" readonly="true">bars<options>bars&#xD;lines&#xD;pie chart</options></input><input type="%n">-200</input><input type="%n">-100</input><input type="%n">400</input><input type="%n">200</input></inputs><script><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="style"/><l>pie chart</l></list></block><script><block s="doDeclareVariables"><list><l>x</l><l>y</l><l>r</l><l>total</l><l>start</l><l>end</l><l>state</l><l>pen size</l><l>heading</l></list></block><block s="doSetVar"><l>r</l><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="height"/><block var="width"/></list></block><block s="reportQuotient"><block var="height"/><l>2</l></block><block s="reportQuotient"><block var="width"/><l>2</l></block></block></block><block s="doSetVar"><l>x</l><block s="reportVariadicSum"><list><block var="left"/><block var="r"/></list></block></block><block s="doSetVar"><l>y</l><block s="reportVariadicSum"><list><block var="bottom"/><block var="r"/></list></block></block><block s="doSetVar"><l>total</l><block s="reportCombine"><block var="data"/><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l></l></list></block></autolambda><list></list></block></block></block><block s="doSetVar"><l>state</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><block s="getPenAttribute"><l></l></block></list></block></autolambda><list></list></block><block s="reportNewList"><list><l>hue</l><l>saturation</l><l>brightness</l></list></block></block></block><block s="doSetVar"><l>pen size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="doSetVar"><l>heading</l><block s="direction"></block></block><block s="setPenColorDimension"><l><option>hue</option></l><l>0</l></block><block s="setPenColorDimension"><l><option>brightness</option></l><l>80</l></block><block s="setPenColorDimension"><l><option>saturation</option></l><l>80</l></block><block s="setSize"><l>1</l></block><block s="doWarp"><script><block s="doForEach"><l>slice</l><block var="data"/><script><block s="doChangeVar"><l>end</l><block s="reportVariadicProduct"><list><block s="reportQuotient"><block var="slice"/><block var="total"/></block><l>360</l></list></block></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="down"></block><block s="doFor"><l>i</l><block var="start"/><block var="end"/><script><block s="gotoXY"><block s="reportVariadicSum"><list><block var="x"/><block s="reportVariadicProduct"><list><block var="r"/><block s="reportMonadic"><l><option>sin</option></l><block var="i"/></block></list></block></list></block><block s="reportVariadicSum"><list><block var="y"/><block s="reportVariadicProduct"><list><block var="r"/><block s="reportMonadic"><l><option>cos</option></l><block var="i"/></block></list></block></list></block></block></script></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="up"></block><block s="setHeading"><block var="start"/></block><block s="turn"><block s="reportQuotient"><block s="reportDifference"><block var="end"/><block var="start"/></block><l>2</l></block></block><block s="forward"><block s="reportQuotient"><block var="r"/><l>2</l></block></block><block s="floodFill"></block><block s="changePenColorDimension"><l><option>hue</option></l><block s="reportQuotient"><l>100</l><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></block></block><block s="doSetVar"><l>start</l><block var="end"/></block></script></block><block s="doForEach"><l>setting</l><block var="state"/><script><block s="setPenColorDimension"><block s="reportListItem"><l>1</l><block var="setting"/></block><block s="reportListItem"><l>2</l><block var="setting"/></block></block></script></block></script></block><block s="setSize"><block var="pen size"/></block><block s="setHeading"><block var="heading"/></block></script><script><block s="doDeclareVariables"><list><l>ratio</l><l>step</l><l>flat line ends</l><l>col</l><l>sorted</l><l>min</l></list></block><block s="doSetVar"><l>sorted</l><custom-block s="$flash sort %l by %predRing"><block var="data"/><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block></block><block s="doIfElse"><block s="reportVariadicLessThan"><list><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block><l>0</l></list></block><script><block s="doSetVar"><l>min</l><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block></block></script><script><block s="doSetVar"><l>min</l><l>0</l></block></script></block><block s="doSetVar"><l>ratio</l><block s="reportQuotient"><block var="height"/><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="sorted"/></block><block var="min"/></block></block></block><block s="doSetVar"><l>step</l><block s="reportQuotient"><block var="width"/><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></block></block><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block var="step"/><l>2</l></list></block><script><block s="doSetVar"><l>col</l><block s="reportDifference"><block var="step"/><l>1</l></block></block></script><script><block s="doSetVar"><l>col</l><block s="reportVariadicProduct"><list><block var="step"/><l>0.8</l></list></block></block></script></block><block s="gotoXY"><block var="left"/><block var="bottom"/></block><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="style"/><l>lines</l></list></block><script><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>-2</l></block></block><block s="doWarp"><script><block s="doUntil"><block s="reportVariadicEquals"><list><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><l>0</l></list></block><script><block s="gotoXY"><block s="reportVariadicSum"><list><block s="xPosition"></block><block var="step"/></list></block><block s="reportVariadicSum"><list><block var="bottom"/><block s="reportVariadicProduct"><list><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="min"/></block><block var="ratio"/></list></block></list></block></block><block s="down"></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block></script><script><block s="doSetVar"><l>flat line ends</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></block><block s="setSize"><l>0.5</l></block><block s="down"></block><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block><block s="doWarp"><script><block s="doUntil"><block s="reportVariadicEquals"><list><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><l>0</l></list></block><script><block s="setSize"><block var="col"/></block><block s="changeYPosition"><block s="reportVariadicProduct"><list><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="min"/></block><block var="ratio"/></list></block></block><block s="setYPosition"><block var="bottom"/></block><block s="setSize"><l>0.5</l></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><l>0</l></list></block><script><block s="changeXPosition"><block var="step"/></block></script><script><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block></script></block></script></block></script></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat line ends"/></block></script></block><block s="up"></block></script></block></script></block-definition><block-definition s="store key: %&apos;key&apos; value: %&apos;value&apos; in browser" type="command" category="other"><header></header><code></code><translations>ca:desa clau: _ amb valor: _ al navegador&#xD;pl:przechowaj klucz: _ wartość: _ w przeglądarce&#xD;</translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>db_store(key, val)</l><list><block var="key"/><block var="value"/></list></block></script></block-definition><block-definition s="stored data in browser" type="reporter" category="other"><header></header><code></code><translations>ca:dades desades al navegador&#xD;pl:dane w przeglądarce&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>db_getall</l><list></list></block></block></script></block-definition><block-definition s="remove key: %&apos;key&apos; in browser" type="command" category="other"><header></header><code></code><translations>ca:esborra clau: _ del navegador&#xD;pl:usuń klucz: _ w przeglądarce&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>db_remove(key)</l><list><block var="key"/></list></block></script></block-definition><block-definition s="clear data in browser" type="command" category="other"><header></header><code></code><translations>ca:esborra dades del navegador&#xD;pl:wyczyść dane w przeglądarce&#xD;</translations><inputs></inputs><script><block s="doWarp"><script><block s="doForEach"><l>item</l><custom-block s="stored data in browser"></custom-block><script><custom-block s="remove key: %s in browser"><block s="reportListItem"><l>1</l><block var="item"/></block></custom-block></script></block></script></block></script></block-definition><block-definition s="get value from key: %&apos;key&apos; in browser" type="reporter" category="other"><comment x="0" y="0" w="199.33333333333334" collapsed="false">Reports the value previously stored under&#xD;the input key in the browser&apos;s local storage.&#xD;Reports False if the key is not found.</comment><header></header><code></code><translations>ca:obté valor de clau: _ al navegador&#xD;pl:pobierz wartość z klucza: _ w przeglądarce&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>db_get(key)</l><list><block var="key"/></list></block></block></script></block-definition><block-definition s="for each tile sized %&apos;side&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="144.00000000000023" collapsed="false">Divide the stage into a grid of square regions with the given side length and perform an action at the center of each.</comment><header></header><code></code><translations>de:für jede Kachel der Größe _ _&#xD;pl:dla każdego kafelka rozmiar _ _&#xD;</translations><inputs><input type="%n">20</input><input type="%ca"></input></inputs><script><block s="doDeclareVariables"><list><l>ext</l><l>dim</l><l>origin</l></list></block><block s="doSetVar"><l>ext</l><block s="reportAttributeOf"><l><option>extent</option></l><block s="reportGet"><l><option>stage</option></l></block></block></block><block s="doSetVar"><l>dim</l><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportQuotient"><block var="ext"/><block var="side"/></block></block></block><block s="doSetVar"><l>origin</l><block s="reportVariadicSum"><list><block s="reportQuotient"><block var="ext"/><l>-2</l></block><block s="reportQuotient"><block s="reportDifference"><block var="ext"/><block s="reportVariadicProduct"><list><block var="dim"/><block var="side"/></list></block></block><l>2</l></block><block s="reportQuotient"><block var="side"/><l>2</l></block></list></block></block><block s="doWarp"><script><block s="doForEach"><l>coord</l><block s="reportCrossproduct"><block s="reportNumbers"><l>1</l><block var="dim"/></block></block><script><block s="doGotoObject"><block s="reportVariadicSum"><list><block var="origin"/><block s="reportVariadicProduct"><list><block s="reportDifference"><block var="coord"/><l>1</l></block><block var="side"/></list></block></list></block></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block></script></block-definition><block-definition s="for each %&apos;tile&apos; in %&apos;cols&apos; %&apos;col&apos; by %&apos;rows&apos; %&apos;row&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="181" collapsed="false">Divide the stage into a grid of same-sized rectangles specified by the number of columns and rows and perform an action at the center of each.</comment><header></header><code></code><translations>de:für jede _ im Raster _ _ zu _ _ _&#xD;pl:dla każdego _ w _ _ po _ _ _&#xD;</translations><inputs><input type="%upvar">$_tile</input><input type="%n">20</input><input type="%upvar">$_column</input><input type="%n">15</input><input type="%upvar">$_row</input><input type="%ca"></input></inputs><script><block s="doDeclareVariables"><list><l>ext</l><l>dim</l><l>origin</l></list></block><block s="doSetVar"><l>ext</l><block s="reportAttributeOf"><l><option>extent</option></l><block s="reportGet"><l><option>stage</option></l></block></block></block><block s="doSetVar"><l>dim</l><block s="reportNewList"><list><block var="cols"/><block var="rows"/></list></block></block><block s="doSetVar"><l>tile</l><block s="reportQuotient"><block var="ext"/><block var="dim"/></block></block><block s="doSetVar"><l>origin</l><block s="reportVariadicSum"><list><block s="reportQuotient"><block var="ext"/><l>-2</l></block><block s="reportQuotient"><block var="tile"/><l>2</l></block></list></block></block><block s="doWarp"><script><block s="doForEach"><l>coord</l><block s="reportCrossproduct"><block s="reportNumbers"><l>1</l><block var="dim"/></block></block><script><block s="doGotoObject"><block s="reportVariadicSum"><list><block var="origin"/><block s="reportVariadicProduct"><list><block s="reportDifference"><block var="coord"/><l>1</l></block><block var="tile"/></list></block></list></block></block><block s="doSetVar"><l>col</l><block s="reportListItem"><l>1</l><block var="coord"/></block></block><block s="doSetVar"><l>row</l><block s="reportListItem"><l>2</l><block var="coord"/></block></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block></script></block-definition><block-definition s="render each %&apos;cell&apos; in table %&apos;table&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="144.00000000000023" collapsed="false">Divide the stage into a grid of square regions matching the dimensions of the given table and perform an action at the center of each.</comment><header></header><code></code><translations>de:für jede _ in Tabelle _ _&#xD;pl:dla każdej _ w tabeli _ _&#xD;</translations><inputs><input type="%upvar" initial="1">$_cell</input><input type="%l" initial="1"></input><input type="%cs" initial="1"></input></inputs><script><block s="doSetVar"><l>table</l><block s="reportListAttribute"><l><option>reverse</option></l><block var="table"/></block></block><custom-block s="for each %upvar in %n %upvar by %n %upvar %ca"><l>tile</l><block s="reportListAttribute"><l><option>length</option></l><block s="reportListItem"><l>1</l><block var="table"/></block></block><l>col</l><block s="reportListAttribute"><l><option>length</option></l><block var="table"/></block><l>row</l><script><block s="doSetVar"><l>cell</l><block s="reportListItem"><block var="col"/><block s="reportListItem"><block var="row"/><block var="table"/></block></block></block><block s="doRun"><block var="action"/><list></list></block></script></custom-block></script></block-definition><block-definition s="arc $turnRight radius: %&apos;r&apos; degrees: %&apos;degrees&apos;" type="command" category="motion"><header></header><code></code><translations>de:Bogen $turnRight Radius: _ Grad: _&#xD;pl:łuk $turnRight promień: _ stopnie: _&#xD;</translations><inputs><input type="%n" initial="1">50</input><input type="%n" initial="1">30</input></inputs><script><block s="doDeclareVariables"><list><l>start</l><l>end</l><l>path</l><l>center</l></list></block><block s="doSetVar"><l>start</l><block s="reportVariadicSum"><list><block s="direction"></block><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>sign</option></l><block var="degrees"/></block><l>-90</l></list></block></list></block></block><block s="doSetVar"><l>end</l><block s="reportVariadicSum"><list><block var="start"/><block var="degrees"/></list></block></block><block s="doSetVar"><l>path</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block s="reportNewList"><list><block s="reportMonadic"><l><option>sin</option></l><l></l></block><block s="reportMonadic"><l><option>cos</option></l><l></l></block></list></block><block var="r"/></list></block></autolambda><list></list></block><block s="reportConcatenatedLists"><list><block s="reportNumbers"><block var="start"/><block var="end"/></block><block s="reportNewList"><list><block var="end"/></list></block></list></block></block></block><block s="doSetVar"><l>center</l><block s="reportDifference"><block s="getPosition"></block><block s="reportListItem"><l>1</l><block var="path"/></block></block></block><block s="doWarp"><script><block s="doForEach"><l>coord</l><block var="path"/><script><block s="doGotoObject"><block s="reportVariadicSum"><list><block var="coord"/><block var="center"/></list></block></block></script></block></script></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="end"/><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>sign</option></l><block var="degrees"/></block><l>90</l></list></block></list></block></block></script></block-definition><block-definition s="arc $turnLeft radius: %&apos;r&apos; degrees: %&apos;degrees&apos;" type="command" category="motion"><header></header><code></code><translations>de:Bogen $turnLeft Radius: _ Grad: _&#xD;pl:łuk $turnLeft promień: _ stopnie: _&#xD;</translations><inputs><input type="%n" initial="1">50</input><input type="%n" initial="1">30</input></inputs><script><custom-block s="arc $turnRight radius: %n degrees: %n"><block var="r"/><block s="reportMonadic"><l><option>neg</option></l><block var="degrees"/></block></custom-block></script></block-definition><block-definition s="all but first letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="199" collapsed="false">Takes a text string as input, and reports a new text string containing all but the first character of the input.</comment><header></header><code></code><translations>pt:_ sem o primeiro caractere&#xD;ca:_ sense la primera lletra&#xD;es:todos menos la primera letra de _&#xD;pl:_ bez pierwszej litery&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="string"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="all but first letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="string"/></block></block></script><list></list></block><block s="doReport"><block s="reportJoinWords"><block s="reportCDR"><block s="reportTextSplit"><custom-block s="require nonempty %s %s"><block var="string"/><l>All but first of empty word.</l></custom-block><l><option>letter</option></l></block></block></block></block></script></block-definition><block-definition s="all but first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="223.000001" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the first word, with one space between words and no spaces at the beginning or end. (Note: consider using SENTENCE➞LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a primeira palavra&#xD;ca:_ sense la primera paraula&#xD;es:todas menos la primera palabra de _&#xD;pl:_ bez pierwszego słowa&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>All but first of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportCDR"><block var="sentence"/></block></block></script></block></script><list></list></block><block s="doReport"><custom-block s="list $arrowRight sentence %l"><block s="reportCDR"><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>All but first of empty sentence.</l></custom-block></block></custom-block></block></script></block-definition><block-definition s="all but last letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218" collapsed="false">Takes a text string as input, and reports a new text string containing all but the last letter of the input.</comment><header></header><code></code><translations>pt:_ sem o último caractere&#xD;ca:_ sense la darrera lletra&#xD;es:todos menos la última letra de _&#xD;pl:_ bez ostatniej litery&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="string"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="all but last letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="string"/></block></block></script><list></list></block><block s="doReport"><block s="reportJoinWords"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportCDR"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportTextSplit"><custom-block s="require nonempty %s %s"><block var="string"/><l>All but first of empty word.</l></custom-block><l><option>letter</option></l></block></block></block></block></block></block></script></block-definition><block-definition s="all but last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="211.99999999999997" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the last word, with one space between words and no spaces at the beginning or end.  (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a última palavra&#xD;ca:_ sense la darrera paraula&#xD;es:todos menos la última palabra de _&#xD;pl:_ bez ostatniego słowa&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>All but last of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportCDR"><block s="reportListAttribute"><l><option>reverse</option></l><block var="sentence"/></block></block></block></block></script></block></script><list></list></block><block s="doReport"><custom-block s="list $arrowRight sentence %l"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportCDR"><block s="reportListAttribute"><l><option>reverse</option></l><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>All but last of empty sentence.</l></custom-block></block></block></block></custom-block></block></script></block-definition><block-definition s="first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="236" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the first word, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a primeira palavra de _&#xD;ca:primera paraula de _&#xD;es:primera palabra de _&#xD;pl:pierwsze słowo _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="sentence"/></block></block></script></block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>First of empty sentence.</l></custom-block></block></block></script></block></script></block-definition><block-definition s="last letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the last character in the string.</comment><header></header><code></code><translations>pt:o último caractere de _&#xD;ca:primera lletra de _&#xD;es:última letra de _&#xD;pl:ostatnia litera _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="last letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><block var="word"/></block><l>0</l></list></block><script><custom-block s="error %txt"><l>Last of empty word.</l></custom-block></script><list></list></block><block s="doReport"><block s="reportLetter"><block s="reportTextAttribute"><l><option>length</option></l><block var="word"/></block><block var="word"/></block></block></script></block-definition><block-definition s="last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="262" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the last word of the input, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a última palavra de _&#xD;ca:darrera paraula de _&#xD;es:última palabra de _&#xD;pl:ostatnie słowo _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>Last of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportListItem"><l><option>last</option></l><block var="sentence"/></block></block></script></block></script><list></list></block><block s="doReport"><block s="reportListItem"><l><option>last</option></l><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>Last of empty sentence.</l></custom-block></block></block></script></block-definition><block-definition s="empty word? %&apos;word&apos;" type="predicate" category="operators"><comment x="0" y="0" w="208" collapsed="false">Takes a text string as input, and reports TRUE if the string has no characters in it of any kind, otherwise false.</comment><header></header><code></code><translations>pt:a palavra _ está vazia&#xD;ca:paraula buida? _&#xD;es:¿palabra vacía? _&#xD;pl:puste słowo? _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="empty word? %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script><list></list></block><block s="doReport"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><block var="word"/></block><l>0</l></list></block></block></script></block-definition><block-definition s="empty sentence? %&apos;sentence&apos;" type="predicate" category="operators"><comment x="0" y="0" w="221" collapsed="false">Takes a text string as input, and reports TRUE if the input contains no characters other than spaces (therefore, no words when the string is considered as a sentence), otherwise FALSE.</comment><header></header><code></code><translations>pt:a frase _ está vazia&#xD;ca:frase buida? _&#xD;es:¿oración vacía? _&#xD;pl:puste zdanie? _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportListIsEmpty"><block var="sentence"/></block></block></script><list></list></block><block s="doReport"><block s="reportListIsEmpty"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block></block></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Like JOIN, takes any number of words (text strings) and reports a sentence with its inputs concatenated, but inserts a blank space between the inputs.&#xD;Consider using SENTENCE (Lists palette) instead.</comment><header></header><code></code><translations>de:füge Wörter zusammen _&#xD;ca:uneix les paraules _&#xD;es:unir las palabras _&#xD;fr:fusionne les mots _&#xD;pt:uma frase com as palavras _&#xD;pl:połącz słowa _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="words"/></block><script><block s="doReport"><l></l></block></script><list></list></block><block s="doDeclareVariables"><list><l>first</l><l>bf</l></list></block><block s="doSetVar"><l>first</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="words"/></block><l><option>list</option></l></block><custom-block s="join words %mult%txt"><block s="reportListItem"><l>1</l><block var="words"/></block></custom-block><block s="reportListItem"><l>1</l><block var="words"/></block></block></block><block s="doSetVar"><l>bf</l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block><block s="doIf"><custom-block s="empty sentence? %txt"><block var="bf"/></custom-block><script><block s="doReport"><block var="first"/></block></script><list></list></block><block s="doIf"><custom-block s="empty sentence? %txt"><block var="first"/></custom-block><script><block s="doReport"><block var="bf"/></block></script><list></list></block><block s="doReport"><block s="reportJoinWords"><list><block var="first"/><l> </l><block var="bf"/></list></block></block></script></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><comment x="0" y="0" w="165.33333333333334" collapsed="false">Takes a sentence in list form and reports the sentence as a text string.</comment><header></header><code></code><translations>de:Liste $arrowRight Satz _&#xD;ca:llista $arrowRight frase _&#xD;es:lista $arrowRight frase _&#xD;fr:liste $arrowRight phrase _&#xD;pt:uma frase com as palavras em _&#xD;pl:lista $arrowRight zdanie _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="146.42857142857144" collapsed="false">report a list in which each item is one letter from the input word</comment><header></header><code></code><translations>de:Wort $arrowRight Liste _&#xD;ca:paraula $arrowRight llista _&#xD;es:palabra $arrowRight lista _&#xD;fr:mot $arrowRight liste _&#xD;pt:uma lista com os caracteres da palavra _&#xD;pl:słowo $arrowRight lista _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="word $arrowRight list %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script><list></list></block><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="158.57142857142858" collapsed="false">join all the items of the input list&#xD;into a single word, and report it</comment><header></header><code></code><translations>de:Liste $arrowRight Wort _&#xD;ca:llista $arrowRight paraula _&#xD;es:lista $arrowRight palabra _&#xD;fr:liste $arrowRight mot _&#xD;pt:uma palavra com os caracteres em _&#xD;pl:lista $arrowRight słowo _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="list"/></block><script><block s="doReport"><block var="list"/></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="list"/></block><l></l></list></block><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script><list></list></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>list</option></l></block><block s="reportNewList"><list><custom-block s="list $arrowRight word %l"><l/></custom-block></list></block><l></l></block></autolambda><list></list></block><block var="list"/></block></block></script></block-definition><block-definition s="require nonempty %&apos;text&apos; %&apos;message&apos;" type="reporter" category="operators" helper="true"><comment x="0" y="0" w="220" collapsed="false">Helper function for word/sentence library.&#xD;Reports its first input, unless that input is empty, in which case it gives its second input as an error message.</comment><header></header><code></code><translations>es:requerir no vacío _ _&#xD;</translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportIfElse"><block s="reportIsA"><block var="text"/><l><option>list</option></l></block><block s="reportListIsEmpty"><block var="text"/></block><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><block var="text"/></block><l>0</l></list></block></block><script><custom-block s="error %txt"><block var="message"/></custom-block></script><script><block s="doReport"><block var="text"/></block></script></block></script></block-definition><block-definition s="first letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the first character in the string.</comment><header></header><code></code><translations>pt:a primeira palavra de _&#xD;ca:primera lletra de _&#xD;es:primera letra de _&#xD;pl:pierwsza litera _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="first letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script><script><block s="doReport"><block s="reportLetter"><l>1</l><custom-block s="require nonempty %s %s"><block var="word"/><l>First of empty word.</l></custom-block></block></block></script></block></script></block-definition><block-definition s="multiline %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:o texto multilinha _&#xD;ca:multilínia _&#xD;pl:wielowiersz _&#xD;</translations><inputs><input type="%mlt"></input></inputs><script><block s="doReport"><block var="text"/></block></script></block-definition><block-definition s="substring of %&apos;string&apos; before %&apos;marker&apos;" type="reporter" category="operators"><comment x="0" y="0" w="175.33333333333334" collapsed="false">Reports the part of the first string up to the first instance of the second string inside it.  If the second string isn&apos;t found, reports the entire first string.</comment><header></header><code></code><translations>pt:o texto de _ antes de _&#xD;ca:part del text _ anterior a _&#xD;pl:podciąg _ przed _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l></list></block><block s="doSetVar"><l>index</l><custom-block s="position of %s in %txt"><block var="marker"/><block var="string"/></custom-block></block><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="index"/><l>0</l></list></block><block var="string"/><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="index"/><l>1</l></list></block><l></l><custom-block s="substring of %txt from position %n to position %n inclusive"><block var="string"/><l>1</l><block s="reportDifference"><block var="index"/><l>1</l></block></custom-block></block></block></block></script></block-definition><block-definition s="substring of %&apos;string&apos; after %&apos;marker&apos;" type="reporter" category="operators"><comment x="0" y="0" w="203.33333333333334" collapsed="false">Reports the portion of the first input string starting after the first occurrence of the second string.  If the second string isn&apos;t found in the first string, reports an empty string.</comment><header></header><code></code><translations>pt:o texto de _ depois de _&#xD;ca:part del text _ posterior a _&#xD;pl:podciąg _ po _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>end</l></list></block><block s="doSetVar"><l>index</l><custom-block s="position of %s in %txt"><block var="marker"/><block var="string"/></custom-block></block><block s="doSetVar"><l>end</l><block s="reportVariadicSum"><list><block var="index"/><block s="reportTextAttribute"><l><option>length</option></l><block var="marker"/></block></list></block></block><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="index"/><l>0</l></list></block><l></l><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block var="end"/><block s="reportTextAttribute"><l><option>length</option></l><block var="string"/></block></list></block><l></l><custom-block s="substring of %txt from position %n to position %n inclusive"><block var="string"/><block var="end"/><l></l></custom-block></block></block></block></script></block-definition><block-definition s="position of %&apos;small&apos; in %&apos;large&apos;" type="reporter" category="operators"><comment x="0" y="0" w="294" collapsed="false">Reports the character position (starting from 1) of the beginning of the first input string inside the second input string.&#xD;If it&apos;s not found, reports 0.</comment><header></header><code></code><translations>pt:a posição de _ em _&#xD;ca:posició de _ en _&#xD;pl:pozycja _ w _&#xD;</translations><inputs><input type="%s"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportGlobalFlag"><l><option>case sensitivity</option></l></block><block s="reportApplyExtension"><l>txt_indexof(sub, txt)</l><list><block var="small"/><block var="large"/></list></block><block s="reportApplyExtension"><l>txt_indexof(sub, txt)</l><list><block s="reportTextAttribute"><l><option>lower case</option></l><block var="small"/></block><block s="reportTextAttribute"><l><option>lower case</option></l><block var="large"/></block></list></block></block></block></script></block-definition><block-definition s="substring of %&apos;str&apos; from position %&apos;start&apos; to position %&apos;end&apos; inclusive" type="reporter" category="operators"><comment x="0" y="0" w="297.3333333333333" collapsed="false">Reports the portion of the first input (string) starting at the position given by the second input (counting from 1, like LETTER n OF) and ending at the position given by the third input (also counting from 1).  If the third input is empty, reports the portion from the first position to the end of the string.&#xD;If a position number is negative, counts from the end backward, so -1 is the last character, -2 is the next to last, etc.</comment><header></header><code></code><translations>pt:o texto de _ entre as posições _ e _ , inclusive&#xD;ca:part del text _ des de la posició _ fins _&#xD;pl:podciąg _ od pozycji _ do pozycji _ włącznie&#xD;</translations><inputs><input type="%txt"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><block s="reportLetter"><block s="reportNumbers"><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="start"/><l>0</l></list></block><block s="reportVariadicSum"><list><block s="reportVariadicSum"><list><block var="start"/><l>1</l></list></block><block s="reportTextAttribute"><l><option>length</option></l><block var="str"/></block></list></block><block var="start"/></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="end"/><l>0</l></list></block><block s="reportTextAttribute"><l><option>length</option></l><block var="str"/></block><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="end"/><l>0</l></list></block><block s="reportVariadicSum"><list><block s="reportVariadicSum"><list><block var="end"/><l>1</l></list></block><block s="reportTextAttribute"><l><option>length</option></l><block var="str"/></block></list></block><block var="end"/></block></block></block><block var="str"/></block></block></block></script></block-definition><block-definition s="text %&apos;string&apos; contains %&apos;marker&apos;" type="predicate" category="operators"><comment x="0" y="0" w="218" collapsed="false">Reports True if the first input string contains the second input string, otherwise false.&#xD;&#xD;Comparison is case-independent by default; use USE CASE-INDEPENDENT COMPARISONS to change that.</comment><header></header><code></code><translations>pt:o texto de _ antes de _&#xD;ca:text _ conté _ ?&#xD;pl:tekst _ zawiera _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportVariadicGreaterThan"><list><custom-block s="position of %s in %txt"><block var="marker"/><block var="string"/></custom-block><l>0</l></list></block></block></script></block-definition><block-definition s="replace every %&apos;pattern&apos; with %&apos;other&apos; in %&apos;text&apos;" type="reporter" category="operators"><comment x="0" y="0" w="90" collapsed="false">substitute all occurrences of a letter or a sequence of letters in a text with another or none.</comment><header></header><code></code><translations>de:ersetze jedes _ durch _ in _&#xD;pl:zamień każde _ na _ w _&#xD;</translations><inputs><input type="%s">t</input><input type="%s">sh</input><input type="%s">tower top</input></inputs><script><block s="doReport"><block s="reportCombine"><block s="reportTextSplit"><block var="text"/><block var="pattern"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><block var="other"/><l></l></list></block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="reshape as %&apos;shape&apos; $⍴-1-255-255-0 items of %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="180" collapsed="false">The first input is a shape list as in&#xD;SHAPE OF.  The output is an array with those dimensions containing  the atomic items of the second input,&#xD;repeating values if more are needed.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportReshape"><block var="data"/><block var="shape"/></block></block></script></block-definition><block-definition s="shape of $⍴-1-255-255-0 %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="310" collapsed="false">Reports a flat list of the maximum size of the input array along&#xD;each dimension: number of rows, number of columns, etc.&#xD;&quot;Maximum&quot; because it works even if the array isn&apos;t uniformly shaped.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>dimensions</option></l><block var="data"/></block></block></script></block-definition><block-definition s="max %&apos;a&apos; $⌈-1-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="150.66666666666666" collapsed="false">Reports the greater of its two inputs. Works on strings too.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportVariadicMax"><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="flatten (ravel) $,-1-255-255-0 %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="216" collapsed="false">Reports a flat list of all the atomic elements &#xD;of sublists of the input list.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>flatten</option></l><block var="data"/></block></block></script></block-definition><block-definition s="rank of $⍴⍴-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="240" collapsed="true">Reports the number of dimensions of the input.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>rank</option></l><block var="array"/></block></block></script></block-definition><block-definition s="inner product helper with %&apos;plus&apos; . %&apos;times&apos; %&apos;a&apos; $nl transposed %&apos;tb&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%repRing"></input><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="a"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="a"/></block></block><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportCONS"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="generalized dotproduct %l %l with sum %repRing product %repRing"><block s="reportListItem"><l>1</l><block var="a"/></block><l/><block var="plus"/><block var="times"/></custom-block></autolambda><list></list></block><block var="tb"/></block><custom-block s="inner product helper with %repRing . %repRing %l %br transposed %l"><block var="plus"/><block var="times"/><block s="reportCDR"><block var="a"/></block><block var="tb"/></custom-block></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><custom-block s="inner product helper with %repRing . %repRing %l %br transposed %l"><block var="plus"/><block var="times"/><block s="reportListItem"><l>1</l><block var="a"/></block><block var="tb"/></custom-block><custom-block s="inner product helper with %repRing . %repRing %l %br transposed %l"><block var="plus"/><block var="times"/><block s="reportCDR"><block var="a"/></block><block var="tb"/></custom-block></block></block></script></block-definition><block-definition s="transpose $⍉-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="168" collapsed="false">Takes a multidimensional array, and&#xD;reports an array whose dimensions&#xD;are reversed (as reported by&#xD;SHAPE OF).  In the case of a&#xD;two-dimensional array, does the usual transposition of rows and columns.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>dta_transpose(list)</l><list><block var="array"/></list></block></block></script></block-definition><block-definition s="reverse row order (column contents) $⦵-1.5-255-255-0 %&apos;list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="286" collapsed="false">Reverses the order of the (toplevel) items of the input.&#xD;&#xD;If the input is a matrix, this means it reverses the order of the rows, which is a reflection through a horizontal axis, as the ⦵ symbol suggests.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>reverse</option></l><block var="list"/></block></block></script></block-definition><block-definition s="multimap %&apos;function&apos; %&apos;data&apos;" type="reporter" category="other" helper="true"><comment x="0" y="0" w="215.33333333333334" collapsed="false">Like MAP, but can take any number of lists&#xD;as inputs.  The lists must all be the same size.&#xD;The function input must take a number of inputs&#xD;equal to the number of lists.  MULTIMAP calls&#xD;the function with all the first items, then all the&#xD;second items, and so on.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>lengths</l><l>cols</l></list></block><block s="doSetVar"><l>lengths</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListAttribute"><l><option>length</option></l><l/></block></autolambda><list></list></block><block var="data"/></block></block><block s="doFor"><l>i</l><l>2</l><block s="reportListAttribute"><l><option>length</option></l><block var="lengths"/></block><script><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="lengths"/></block><block s="reportListItem"><block var="i"/><block var="lengths"/></block></list></block></block><script><custom-block s="error %txt"><l>Non-conforming shapes.</l></custom-block></script><list></list></block></script></block><block s="doSetVar"><l>cols</l><block s="reportListAttribute"><l><option>columns</option></l><block var="data"/></block></block><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><block var="cols"/></block></block></script></block></script></block-definition><block-definition s="generalized dotproduct %&apos;a&apos; %&apos;b&apos; with sum %&apos;sum&apos; product %&apos;product&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reportCombine"><custom-block s="multimap %repRing %mult%l"><block var="product"/><list><block var="a"/><block var="b"/></list></custom-block><block var="sum"/></block></block></script></block-definition><block-definition s="inner product %&apos;a&apos; %&apos;plus&apos; $.-1-255-255-0 %&apos;times&apos; %&apos;b&apos;" type="reporter" category="lists"><comment x="0" y="0" w="252.66666666666666" collapsed="false">Computes a generalized matrix multiplication.&#xD;&#xD;In normal matrix multiplication, each cell of the result&#xD;is computed by multiplying individual numbers within&#xD;a row of the left input and a column of the right input,&#xD;and then adding those products.  In APL terms this is&#xD;+.× (&quot;plus dot times&quot;)&#xD;Any dyadic functions can replace addition and multiplication in this algorithm; a common case is&#xD;∨.∧ (&quot;or dot and&quot;)</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="a"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>a</l><block s="reportNewList"><list><block var="a"/></list></block></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="b"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>b</l><block s="reportNewList"><list><block var="b"/></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block><l>1</l></list></block><block s="reportVariadicGreaterThan"><list><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block><l>1</l></list></block></list></block><script><block s="doDeclareVariables"><list><l>ta</l></list></block><block s="doSetVar"><l>ta</l><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="a"/></custom-block></block><block s="doSetVar"><l>a</l><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block var="ta"/></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block></block></block></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicGreaterThan"><list><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block><l>1</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block><l>1</l></list></block></list></block><script><block s="doSetVar"><l>b</l><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block var="b"/></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block></block></block></block></script><list></list></block><block s="doReport"><custom-block s="inner product helper with %repRing . %repRing %l %br transposed %l"><block var="plus"/><block var="times"/><block var="a"/><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="min %&apos;a&apos; $⌊-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="211.33333333333334" collapsed="true">Reports the smaller of its two inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportVariadicMin"><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="combine in rows (reduce by column vectors) %&apos;func&apos; $/-1-255-255-0 %&apos;stuff&apos;" type="reporter" category="lists"><comment x="0" y="0" w="288.6666666666667" collapsed="false">This function has two names because there are two ways&#xD;to understand it.&#xD;&#xD;Lisp way:  A matrix is a list of rows.  This block combines the numbers in each row, producing one value for the entire row.&#xD;&#xD;APL way:  A matrix is made of vectors.  This block takes each column as a vector, and does vector arithmetic on the columns, producing one column as the result.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="stuff"/></custom-block><l>1</l></list></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block var="func"/><l/></custom-block></autolambda><list></list></block><block var="stuff"/></block></block></script><script><block s="doReport"><block s="reportCombine"><block var="stuff"/><block var="func"/></block></block></script></block></script></block-definition><block-definition s="%&apos;howmany&apos; deal helper %&apos;data&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="howmany"/><l>0</l></list></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doDeclareVariables"><list><l>choices</l><l>index</l></list></block><block s="doSetVar"><l>choices</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block var="howmany"/><script><block s="doSetVar"><l>index</l><block s="reportRandom"><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></block></block><block s="doAddToList"><block s="reportListItem"><block var="index"/><block var="data"/></block><block var="choices"/></block><block s="doDeleteFromList"><block var="index"/><block var="data"/></block></script></block><block s="doReport"><block var="choices"/></block></script></block></script></block-definition><block-definition s="signum $×-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="159.99999999999997" collapsed="false">Reports 1 if the input is positive,&#xD;0 if the input is zero,&#xD;or -1 if the input is negative.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="num"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="signum $×-1-255-255-0 %n"><l></l></custom-block></autolambda><list></list></block><block var="num"/></block></block></script><list></list></block><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="num"/></block><script><block s="doReport"><l>0</l></block></script><list></list></block><block s="doReport"><block s="reportQuotient"><block var="num"/><block s="reportMonadic"><l><option>abs</option></l><block var="num"/></block></block></block></script></block-definition><block-definition s="reciprocal $÷-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="102.66666666666667" collapsed="false">reports 1 divided&#xD;by its input.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportQuotient"><l>1</l><block var="num"/></block></block></script></block-definition><block-definition s="roll $?-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="180.66666666666666" collapsed="false">This block reports a random integer between 1 and its input.  To roll more than one die, use (for three dice)&#xD;roll (reshape as 3 items of 6)&#xD;APL:  ?3⍴6&#xD;Don&apos;t use reshape as 3 items of (roll 6), because that would roll one die and report 3 copies of the same random roll. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportRandom"><l>1</l><block var="num"/></block></block></script></block-definition><block-definition s="scalar? %&apos;x&apos;" type="predicate" category="other" helper="true"><comment x="0" y="0" w="199.33333333333334" collapsed="false">Reports True if the input is an APL scalar,&#xD;i.e., either an atomic (non-list) value, or&#xD;an array (list of lists) of any depth with only&#xD;one atomic item, e.g., (list (list (list (3)))).</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="x"/><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="doReport"><block s="reportVariadicEquals"><list><block s="reportAtomicCombine"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="x"/></custom-block><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block></block><l>1</l></list></block></block></script></block-definition><block-definition s="scalar-value helper %&apos;x&apos;" type="reporter" category="other" helper="true"><comment x="0" y="0" w="200.66666666666663" collapsed="false">The input must be a value for which SCALAR? reports true, i.e., either an atom or a list of any depth but only one scalar item of item of... etc.  This function returns the underlying scalar (number, etc.).</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="x"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="x"/></block></script><list></list></block><block s="doReport"><custom-block s="scalar-value helper %s"><block s="reportListItem"><l>1</l><block var="x"/></block></custom-block></block></script></block-definition><block-definition s="NAND %&apos;a&apos; $⍲-1.4-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports the not-and of its inputs, in the form&#xD;0 for false, 1 for true.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="LCM (and) %n $∧-1.2-255-255-0 %n"><block var="a"/><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="NOR %&apos;a&apos; $⍱-1.4-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports the not-and of its inputs, in the form&#xD;0 for false, 1 for true.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><block var="a"/><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="%&apos;a&apos; ≤ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="151.33333333333334" collapsed="true">Reports True if the left input is&#xD;less than or equal to the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportVariadicLessThanOrEquals"><list><block var="a"/><block var="b"/></list></block><comment w="176.66666666666666" collapsed="true">This is the primitive version.</comment></block></script></block-definition><block-definition s="%&apos;a&apos; ≥ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="152.66666666666666" collapsed="false">Reports True if the left input is&#xD;greater than than or equal to&#xD;the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportVariadicGreaterThanOrEquals"><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="XOR %&apos;a&apos; $≠-1-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="190" collapsed="false">Reports False if its inputs are equal;&#xD;reports True if its inputs are not equal.&#xD;The inputs can have any non-list values.&#xD;(Lists are hyperized.)  If the inputs are&#xD;Booleans (True/False or 1/0), this is&#xD;also the exclusive-or function.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="%s scalar %s %s"><block var="a"/><l>≠</l><block var="b"/></custom-block></block></script></block-definition><block-definition s="zero? %&apos;n&apos;" type="predicate" category="other" helper="true"><comment x="0" y="0" w="202.66666666666666" collapsed="true">reports True iff the input is 0 or False.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="n"/></block></block></script></block-definition><block-definition s="truth %&apos;n&apos;" type="predicate" category="other" helper="true"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports a Snap! Boolean False if the input&#xD;is False or 0; reports True otherwise.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="truth %s"><l></l></custom-block></autolambda><list></list></block><block var="n"/></block></block></script><list></list></block><block s="doReport"><block s="reportIfElse"><block s="reportIsA"><block var="n"/><l><option>Boolean</option></l></block><block var="n"/><block s="reportNot"><block s="reportVariadicEquals"><list><block var="n"/><l>0</l></list></block></block></block></block></script></block-definition><block-definition s="make scalar %&apos;value&apos;" type="reporter" category="operators" helper="true"><comment x="0" y="0" w="242.66666666666666" collapsed="false">Turns list of list of ... a single scalar (e.g., ((((x)))) ) into just the scalar.  Error if called with anything else.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="scalar? %s"><block var="value"/></custom-block><script><block s="doReport"><custom-block s="scalar-value helper %s"><block var="value"/></custom-block></block></script><list></list></block><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Make scalar called with non-singleton input </l><block var="value"/></list></block></custom-block></script></block-definition><block-definition s="$⍳-1.5-255-255-0 %&apos;n&apos;" type="reporter" category="lists"><comment x="0" y="0" w="290.6666666666667" collapsed="false">If the input is a positive integer, reports a list of the numbers&#xD;from 1 to that input.  (If the input is 0, reports an empty list.)&#xD;&#xD;If the input is a list of positive integers, reports an array with&#xD;the shape specified by the input (as in ⍴ reshape) in which&#xD;each item is a list of the indices of that item in the array&#xD;(so technically the shape has one more dimension&#xD;than the input, whose size is the size of the input).&#xD;&#xD;If the input is a list that includes 0, the result is an array whose shape is the part of the input list before the 0, in which every element is empty.  If you&apos;d like some other value in every element, MD-MAP a constant function over the result.&#xD;&#xD;For list inputs, the size of the result grows very quickly, more or less the factorial of the size of the input.  Snap! will not attempt to compute a result bigger than a few million atomic items.&#xD;⍳(⍳ 9) will work (≈ 3 million atoms) but ⍳(⍳ 10) will give an error.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="n"/></custom-block><l>1</l></list></block><script><block s="doIfElse"><block s="reportListContainsItem"><block var="n"/><l>0</l></block><script><block s="doReport"><block s="reportReshape"><block s="reportNewList"><list></list></block><block s="reportListItem"><block s="reportNumbers"><l>1</l><block s="reportDifference"><block s="reportListIndex"><l>0</l><block var="n"/></block><l>1</l></block></block><block var="n"/></block></block></block></script><script><block s="doReport"><block s="reportReshape"><custom-block s="crossproduct %mult%l"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportNumbers"><l>1</l><l></l></block></autolambda><list></list></block><block var="n"/></block></custom-block><block s="reportConcatenatedLists"><list><block var="n"/><block s="reportNewList"><list><block s="reportListAttribute"><l><option>length</option></l><block var="n"/></block></list></block></list></block></block></block></script></block></script><script><custom-block s="error %txt"><l>Input to ⍳ can&apos;t be a list of lists.</l></custom-block></script></block></script><script><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="n"/></custom-block><block s="reportNewList"><list></list></block><block s="reportNumbers"><l>1</l><block var="n"/></block></block></block></script></block></script></block-definition><block-definition s="where in %&apos;vector&apos; is $⍳-1.5-255-255-0 %&apos;items&apos;" type="reporter" category="lists"><comment x="0" y="0" w="334.6666666666667" collapsed="false">If the rank of the left input is one more than the rank of the right input,&#xD;reports the index of the right input in the left input, or if not found,&#xD;reports one more than the length of the left input.&#xD;&#xD;If the rank of the left input is equal to the rank of the right input,&#xD;reports a vector of the indices of the items of the right input&#xD;in the left input (mapping this function over the right input).&#xD;&#xD;If the rank of the left input is more than that of the right input by 2 or more,&#xD;reports a vector, the location of the right input in the left in each dimension.&#xD;&#xD;It is an error if the rank of the left input is less than that of the right input.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doIf"><block s="reportVariadicLessThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block></list></block><script><custom-block s="error %txt"><l>Left input to ⍳ must have greater or equal rank to right input.</l></custom-block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block></list></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="where in %l is $⍳-1.5-255-255-0 %s"><block var="vector"/><l></l></custom-block></autolambda><list></list></block><block var="items"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><block s="reportVariadicSum"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block><l>1</l></list></block></list></block><script><block s="doSetVar"><l>result</l><block s="reportListIndex"><block var="items"/><block var="vector"/></block></block><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="result"/></custom-block><block s="reportVariadicSum"><list><block s="reportListAttribute"><l><option>length</option></l><block var="vector"/></block><l>1</l></list></block><block var="result"/></block></block></script><list></list></block><block s="doSetVar"><l>result</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><custom-block s="%l deep contains %s"><l/><block var="items"/></custom-block></autolambda><list></list></block><block var="vector"/></block></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="result"/><l></l></list></block><script><block s="doReport"><block s="reportVariadicSum"><list><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="vector"/></custom-block><l>1</l></list></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><block s="reportListIndex"><block var="result"/><block var="vector"/></block><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><custom-block s="where in %l is $⍳-1.5-255-255-0 %s"><block var="result"/><block var="items"/></custom-block></custom-block></block></block></script></block-definition><block-definition s="crossproduct %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="305.3333333333333" collapsed="false">This isn&apos;t an APL function, although it&apos;s related to the outer product.&#xD;&#xD;It takes any number of lists, and reports a list of all possible tuples with one item from each of the lists.  The length of the result is the product of the lengths of the inputs.&#xD;&#xD;The result gets very big very quickly.  Snap! will refuse to do this computation if the result would be more than a few million atomic items.  (crossproduct (⍳(⍳9))) makes about 3 million atomic items; (crossproduct (⍳(⍳10))) gives an error message.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>dta_crossproduct(list)</l><list><block var="lists"/></list></block></block></script></block-definition><block-definition s="%&apos;array&apos; deep contains %&apos;value&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="array"/><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doIf"><block s="reportListContainsItem"><block var="array"/><block var="value"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="doReport"><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportVariadicOr"><list><l/><l/></list></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="%l deep contains %s"><l/><block var="value"/></custom-block></autolambda><list></list></block><block var="array"/></block></custom-block></block></script></block-definition><block-definition s="which of %&apos;items&apos; $ϵ-1-255-255-0 contained in %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="214.66666666666666" collapsed="false">Reports an array of Booleans the same shape&#xD;as the left input, indicating which of the atoms&#xD;in the left input appear anywhere in the right&#xD;input.  &#xD;(The structure of the right input doesn&apos;t matter.)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="items"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><custom-block s="which of %s $ϵ-1-255-255-0 contained in %l"><l></l><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><block var="array"/></custom-block></custom-block></autolambda><list></list></block><block var="items"/></block></block></script><script><block s="doReport"><block s="reportListContainsItem"><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><block var="array"/></custom-block><block var="items"/></block></block></script></block></script></block-definition><block-definition s="catenate %&apos;left&apos; $,-1-255-255-0 %&apos;right&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Like append, but:&#xD;&#xD;A scalar input is treated as an array the same shape as the other input except that the last item of the shape is 1.&#xD;&#xD;If the two inputs are of different ranks,&#xD;the function is mapped over the larger ranked input.&#xD;&#xD;Catenate adds new columns, by appending to each row.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="left"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block><l>1</l></list></block><script><block s="doSetVar"><l>left</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>-1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="right"/></custom-block></custom-block><block s="reportNewList"><list><l>1</l></list></block></list></block><block s="reportNewList"><list><block var="left"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>left</l><block s="reportNewList"><list><block var="left"/></list></block></block></script></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="right"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></list></block><script><block s="doSetVar"><l>right</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>-1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="left"/></custom-block></custom-block><block s="reportNewList"><list><l>1</l></list></block></list></block><block s="reportNewList"><list><block var="right"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>right</l><block s="reportNewList"><list><block var="right"/></list></block></block></script></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></list></block><script><block s="doIfElse"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></list></block><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="left"/><block var="right"/></list></block></block></script><script><block s="doReport"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="left"/><block var="right"/></list></custom-block></block></script></block></script><list></list></block><block s="doIfElse"><block s="reportVariadicLessThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></list></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><block var="left"/><l></l></custom-block></autolambda><list></list></block><block var="right"/></block></block></script><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><block var="right"/></custom-block></autolambda><list></list></block><block var="left"/></block></block></script></block></script></block-definition><block-definition s="scalar value %&apos;value&apos;" type="reporter" category="lists"><comment x="0" y="0" w="221.33333333333334" collapsed="false">If the input is a nesting of length=1 lists, which&#xD;APL treats as a scalar (the innermost item)&#xD;for many purposes, report that innermost scalar.&#xD;Otherwise, report the input as is.&#xD;&#xD;Exposing this block for users is important because Snap! /does not/ treat such a nesting&#xD;as a scalar, so you might need to use this in&#xD;translating an APL program to Snap!.&#xD;(But the functions in the APL library already use&#xD;this block as needed.)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><custom-block s="scalar? %s"><block var="value"/></custom-block><custom-block s="scalar-value helper %s"><block var="value"/></custom-block><block var="value"/></block></block></script></block-definition><block-definition s="grade up $⍋-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Reports a vector of indices of the items of the input, in order of the values of the items, so that&#xD;&#xD;item (grade up (foo)) of (foo)&#xD;&#xD;reports the items in sorted order, smallest to largest.  For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l><option>last</option></l><l/></block></autolambda><list></list></block><custom-block s="$flash sort %l ordering with %predRing"><custom-block s="multimap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="array"/><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportListAttribute"><l><option>length</option></l><block var="array"/></block></custom-block></list></custom-block><block s="reifyPredicate"><autolambda><custom-block s="sort helper %l %l"><l/><l/></custom-block></autolambda><list></list></block></custom-block></block></block></script></block-definition><block-definition s="sort helper %&apos;rowA&apos; %&apos;rowB&apos;" type="reporter" category="other" helper="true"><comment x="0" y="0" w="166" collapsed="false">Compares two vectors for sorting.&#xD;Compare first items; if those are equal compare second items; etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="rowA"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="doIf"><block s="reportListIsEmpty"><block var="rowB"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><block var="rowA"/></block><block s="reportListItem"><l>1</l><block var="rowB"/></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportListItem"><l>1</l><block var="rowA"/></block><block s="reportListItem"><l>1</l><block var="rowB"/></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="doReport"><custom-block s="sort helper %l %l"><block s="reportCDR"><block var="rowA"/></block><block s="reportCDR"><block var="rowB"/></block></custom-block></block></script></block-definition><block-definition s="grade down $⍒-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Reports a vector of indices of the items of the input, in order of the values of the items, so that&#xD;&#xD;item (grade down (foo)) of (foo)&#xD;&#xD;reports the items in sorted order, largest to smallest.  For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l><option>last</option></l><l/></block></autolambda><list></list></block><custom-block s="$flash sort %l ordering with %predRing"><custom-block s="multimap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="array"/><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportListAttribute"><l><option>length</option></l><block var="array"/></block></custom-block></list></custom-block><block s="reifyPredicate"><autolambda><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="sort helper %l %l"><l/><l/></custom-block></custom-block></autolambda><list></list></block></custom-block></block></block></script></block-definition><block-definition s="select rows (compress columns) %&apos;Booleans&apos; $/-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="210.66666666666666" collapsed="false">The left input must be a vector of Booleans&#xD;(either Snap! form or APL form); the right input must be an array whose first dimension is equal to the length of the left input.  The block reports an array of the same rank as the right input, containing only those items (rows, for a matrix) for which the corresponding Boolean is True (or 1).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="rowize vector %l"><block s="reportAtomicKeep"><block s="reifyPredicate"><autolambda><custom-block s="truth %s"><block s="reportListItem"><block var="index"/><block var="Booleans"/></block></custom-block></autolambda><list><l>value</l><l>index</l></list></block><block var="array"/></block></custom-block></block></script></block-definition><block-definition s="rowize vector %&apos;vec&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vec"/></custom-block><l>2</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>2</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="vec"/></custom-block></block><l>1</l></list></block></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="vec"/></block><block var="vec"/></block></block></script></block-definition><block-definition s="select columns (compress rows) %&apos;bool&apos; $⌿-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="219.33333333333334" collapsed="false">The left input must be a vector of Booleans&#xD;(either Snap! form or APL form); the right input must be an array whose last dimension is equal to the length of the left input.  The block reports an array of the same rank as the right input, containing only those items (columns, for a matrix) for which the corresponding Boolean is True (or 1).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="select rows (compress columns) %l $/-1-255-255-0 %l"><block var="bool"/><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="columnwise %&apos;function&apos; %&apos;data&apos;" type="reporter" category="control" helper="true"><comment x="0" y="0" w="212" collapsed="false">Turns a row-wise (in Lisp terminology) function&#xD;into a column-wise one.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="rowize vector %l"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block s="evaluate"><block var="function"/><list><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="data"/></custom-block></list></block></custom-block></custom-block></block></script></block-definition><block-definition s="reverse column order (row contents) $⏀-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="206" collapsed="false">Reverses the order of the columns of the input, which is a reflection through a vertical axis, as the ⏀ symbol suggests.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="reverse row order (column contents) $⦵-1.5-255-255-0 %l"><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="combine in columns (reduce by row vectors) %&apos;function&apos; $⌿-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="285.3333333333333" collapsed="false">This function has two names because there are two ways&#xD;to understand it.&#xD;&#xD;Lisp way:  A matrix is a list of rows.  This block turns it into a list of columns, and combines the numbers in each column, producing one value for the entire column.&#xD;&#xD;APL way:  A matrix is made of vectors.  This block takes each row as a vector, and does vector arithmetic on the rows, producing one row as the result.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block var="function"/><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="catenate vertically %&apos;left&apos; $⍪-1.5-255-255-0 %&apos;right&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Like append, but:&#xD;&#xD;A scalar input is treated as a vector&#xD;of length 1.&#xD;&#xD;If the two inputs are of different ranks,&#xD;the function is mapped over the larger ranked input.&#xD;&#xD;Catenate vertically adds new rows, by appending to each column.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="left"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block><l>1</l></list></block><script><block s="doSetVar"><l>left</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><block s="reportNewList"><list><l>1</l></list></block><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="right"/></custom-block></custom-block></list></block><block s="reportNewList"><list><block var="left"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>left</l><block s="reportNewList"><list><block var="left"/></list></block></block></script></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="right"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></list></block><script><block s="doSetVar"><l>right</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><block s="reportNewList"><list><l>1</l></list></block><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="left"/></custom-block></custom-block></list></block><block s="reportNewList"><list><block var="right"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>right</l><block s="reportNewList"><list><block var="right"/></list></block></block></script></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></list></block><script><block s="doIfElse"><block s="reportVariadicEquals"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></list></block><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="left"/><block var="right"/></list></block></block></script><script><block s="doReport"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><custom-block s="catenate %s $,-1-255-255-0 %s"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="left"/></custom-block><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="right"/></custom-block></custom-block></custom-block></block></script></block></script><list></list></block><block s="doIfElse"><block s="reportVariadicLessThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></list></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><block var="left"/><l></l></custom-block></autolambda><list></list></block><block var="right"/></block></block></script><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><block var="right"/></custom-block></autolambda><list></list></block><block var="left"/></block></block></script></block></script><scripts><script x="254" y="497.7777777777774"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><script></script><list></list></block><list><l/><l/></list></custom-block></script></scripts></block-definition><block-definition s="%&apos;a&apos; scalar join %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="219.33333333333334" collapsed="false">A hyperblock version of JOIN.  The regular JOIN isn&apos;t hyperized because it can accept a list as input, representing it as text.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="take %&apos;howmany&apos; $↑-1-255-255-0 from %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="272" collapsed="false">A positive left input selects the first n items of the right input.&#xD;A negative left input selects the last abs(n) items&#xD;of the right input.&#xD;&#xD;If the right input is a matrix, a numeric left input selects rows;&#xD;the left input may also be a two-item vector, in which case&#xD;the first number is applied to the rows&#xD;and the second number is applied to the columns.&#xD;Similarly for higher-dimension arrays. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="howmany"/><l><option>number</option></l></block><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="howmany"/><l>0</l></list></block><block s="reportListItem"><block s="reportVariadicSum"><list><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportMonadic"><l><option>abs</option></l><block var="howmany"/></block></custom-block><block s="reportVariadicSum"><list><block s="reportListAttribute"><l><option>length</option></l><block var="array"/></block><block var="howmany"/></list></block></list></block><block var="array"/></block><block s="reportListItem"><custom-block s="$⍳-1.5-255-255-0 %n"><block var="howmany"/></custom-block><block var="array"/></block></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThan"><list><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="howmany"/></custom-block><l>1</l></list></block><script><custom-block s="error %txt"><l>Left input to take can&apos;t be a matrix.</l></custom-block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="howmany"/></block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="array"/></custom-block></list></block><script><custom-block s="error %txt"><l>Length of item vector &gt; rank of array in take.</l></custom-block></script><list></list></block><block s="doReport"><block s="reportListItem"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="value"/><l>0</l></list></block><block s="reportVariadicSum"><list><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportMonadic"><l><option>abs</option></l><block var="value"/></block></custom-block><block s="reportVariadicSum"><list><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><block var="value"/></list></block></list></block><custom-block s="$⍳-1.5-255-255-0 %n"><block var="value"/></custom-block></block></autolambda><list><l>value</l><l>index</l></list></block><block var="howmany"/></block><block var="array"/></block></block></script></block-definition><block-definition s="drop %&apos;howmany&apos; $↓-1-255-255-0 from %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="306" collapsed="false">A positive left input selects all but the first n items of the right input.&#xD;A negative left input selects all but the last abs(n) items&#xD;of the right input.&#xD;&#xD;If the right input is a matrix, a numeric left input selects rows;&#xD;the left input may also be a two-item vector, in which case&#xD;the first number is applied to the rows&#xD;and the second number is applied to the columns.&#xD;Similarly for higher-dimension arrays. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="howmany"/><l><option>number</option></l></block><script><block s="doReport"><custom-block s="take %n $↑-1-255-255-0 from %l"><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><custom-block s="signum $×-1-255-255-0 %n"><block var="howmany"/></custom-block></block><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block var="array"/></block><block s="reportMonadic"><l><option>abs</option></l><block var="howmany"/></block></block></list></block><block var="array"/></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="take %n $↑-1-255-255-0 from %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="value"/><l>0</l></list></block><block s="reportVariadicSum"><list><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><block var="value"/></list></block><block s="reportDifference"><block var="value"/><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block></block></block></autolambda><list><l>value</l><l>index</l></list></block><block var="howmany"/></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="simple log base %&apos;b&apos; of %&apos;n&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportMonadic"><l><option>ln</option></l><block var="n"/></block><block s="reportMonadic"><l><option>ln</option></l><block var="b"/></block></block></block></script></block-definition><block-definition s="simple permutations of %&apos;r&apos; items out of %&apos;n&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="r"/><l>0</l></list></block><l>1</l><block s="reportAtomicCombine"><block s="reportNumbers"><block s="reportVariadicSum"><list><block s="reportDifference"><block var="n"/><block var="r"/></block><l>1</l></list></block><block var="n"/></block><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block></block></block></block></script></block-definition><block-definition s="simple combs %&apos;r&apos; out of %&apos;n&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportQuotient"><custom-block s="simple permutations of %n items out of %n"><block var="r"/><block var="n"/></custom-block><custom-block s="factorial $!-1-255-255-0 %n"><block var="r"/></custom-block></block></block></script></block-definition><block-definition s="numbers from %&apos;from&apos; to %&apos;to&apos; ascending" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple numbers from %n to %n ascending"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><block var="from"/><block var="to"/></list></block></block></script></block-definition><block-definition s="simple gcd %&apos;a&apos; %&apos;b&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="b"/><l>0</l></list></block><script><block s="doReport"><block var="a"/></block></script><list></list></block><block s="doReport"><custom-block s="simple gcd %n %n"><block var="b"/><block s="reportModulus"><block var="a"/><block var="b"/></block></custom-block></block></script></block-definition><block-definition s="de-boolean %&apos;n&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="de-boolean %s"><l></l></custom-block></autolambda><list></list></block><block var="n"/></block></block></script><script><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="n"/></custom-block><l>0</l><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="n"/><block s="reportBoolean"><l><bool>true</bool></l></block></list></block><l>1</l><block var="n"/></block></block></block></script></block></script></block-definition><block-definition s="simple lcm %&apos;a&apos; %&apos;b&apos;" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="b"/><l>0</l></list></block><script><block s="doReport"><block var="b"/></block></script><list></list></block><block s="doReport"><block s="reportVariadicProduct"><list><block var="a"/><block s="reportQuotient"><block var="b"/><custom-block s="simple gcd %n %n"><block var="a"/><block var="b"/></custom-block></block></list></block></block></script></block-definition><block-definition s="simple numbers from %&apos;from&apos; to %&apos;to&apos; ascending" type="reporter" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportVariadicGreaterThan"><list><block var="from"/><block var="to"/></list></block><block s="reportNewList"><list></list></block><block s="reportNumbers"><block var="from"/><block var="to"/></block></block></block></script></block-definition><block-definition s="scalar -&gt; hyper %&apos;func&apos;" type="reporter" category="control" helper="true"><comment x="0" y="0" w="218" collapsed="false">Takes a dyadic scalar function as input, and&#xD;hyperizes it, so that it can take lists as inputs.&#xD;&#xD;Don&apos;t use on slow functions (this has compiled map calls).  Meant for use on primitives.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>hyper func</l><l>scalarized</l></list></block><block s="doSetVar"><l>hyper func</l><block s="reifyReporter"><script><block s="doWarp"><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="a"/></custom-block><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="b"/></custom-block><script><block s="doReport"><block s="evaluate"><block var="func"/><list><custom-block s="scalar-value helper %s"><block var="a"/></custom-block><custom-block s="scalar-value helper %s"><block var="b"/></custom-block></list></block></block></script><script><block s="doSetVar"><l>scalarized</l><custom-block s="scalar-value helper %s"><block var="a"/></custom-block></block><block s="doIf"><block s="reportVariadicEquals"><list><l></l><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="b"/></block></list></block><script><block s="doReport"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="func"/><list><block var="scalarized"/><l></l></list></block></autolambda><list></list></block><block var="b"/></block></block></script><list></list></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="hyper func"/><list><block var="scalarized"/><l></l></list></block></autolambda><list></list></block><block var="b"/></block></block></script></block></script><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="b"/></custom-block><script><block s="doSetVar"><l>scalarized</l><custom-block s="scalar-value helper %s"><block var="b"/></custom-block></block><block s="doIf"><block s="reportVariadicEquals"><list><l></l><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="a"/></block></list></block><script><block s="doReport"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="func"/><list><l></l><block var="scalarized"/></list></block></autolambda><list></list></block><block var="a"/></block></block></script><list></list></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="hyper func"/><list><l></l><block var="scalarized"/></list></block></autolambda><list></list></block><block var="a"/></block></block></script><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><l></l><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="a"/></block></list></block><block s="reportVariadicEquals"><list><l></l><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="b"/></block></list></block></list></block><script><block s="doReport"><custom-block s="multimap %repRing over %mult%l"><block var="func"/><list><block var="a"/><block var="b"/></list></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="multimap %repRing over %mult%l"><block var="hyper func"/><list><block var="a"/><block var="b"/></list></custom-block></block></script></block></script></block></script></block></script><list><l>a</l><l>b</l></list></block></block><block s="doReport"><block var="hyper func"/></block></script></block-definition><block-definition s="log base %&apos;b&apos; $⍟-1.5-255-255-0 %&apos;x&apos;" type="reporter" category="operators"><comment x="0" y="0" w="212" collapsed="false">Computes logarithms in any base.&#xD;&#xD;The base is the left input.  It&apos;s usual in APL that if there&apos;s a main data input and some sort of control input, the latter comes on the left.  This is because APL syntax, unless you use parentheses, groups computations from right to left.&#xD;&#xD;APL has a monadic version of this function that computes natural logs (log to the base e).</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple log base %n of %n"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><block var="b"/><block var="x"/></list></block></block></script></block-definition><block-definition s="combs %&apos;r&apos; at a time $!-1-255-255-0 of %&apos;n&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218.66666666666666" collapsed="false">Computes the number of combinations of right-input things taken left-input at a time, otherwise known as the elements of Pascal&apos;s triangle.  This block shares the ! symbol with the monadic factorial function, because the formula for computing this function uses factorials.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple combs %n out of %n"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><block var="r"/><block var="n"/></list></block></block></script></block-definition><block-definition s="factorial $!-1-255-255-0 %&apos;n&apos;" type="reporter" category="operators"><comment x="0" y="0" w="172.66666666666666" collapsed="false">The factorial of a positive integer n is the product of the integers from 1 to n.&#xD;&#xD;In real APL, the domain of this function is extended beyond integers to compute the gamma function.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="factorial $!-1-255-255-0 %n"><l></l></custom-block></autolambda><list></list></block><block var="n"/></block></block></script><script><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="n"/></custom-block><l>1</l><block s="reportAtomicCombine"><block s="reportNumbers"><l>1</l><block var="n"/></block><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block></block></block></block></script></block></script></block-definition><block-definition s="%&apos;a&apos; scalar %&apos;pred&apos; %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="190" collapsed="false">Acts just like the function selected from&#xD;the pulldown menu, but hyperized, so&#xD;comparing two equal-sized lists reports&#xD;a list of the same length as the inputs,&#xD;with the results of item-by-item comparisons.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s" readonly="true">﹦<options>﹦&#xD;≠&#xD;identical to&#xD;and&#xD;or&#xD;is _ a _?</options></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reportListItem"><block s="reportListIndex"><block var="pred"/><block s="reportNewList"><list><l>﹦</l><l>≠</l><l>identical to</l><l>and</l><l>or</l><l>is _ a _?</l></list></block></block><block s="reportNewList"><list><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><l></l><l></l></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicNotEquals"><list><l></l><l></l></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicIsIdentical"><list><l></l><l></l></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicAnd"><list><l/><l/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicOr"><list><l/><l/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l></l></block></autolambda><list></list></block></list></block></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="GCD (or) %&apos;a&apos; $∨-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Reports the greatest common divisor of its inputs.&#xD;If the inputs are values in {0,1} then this is equivalent to the logical OR of the values, with 0=False, 1=True.  Hence the APL symbol ∨.&#xD;Also accepts Snap! Booleans as inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple gcd %n %n"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><custom-block s="de-boolean %s"><block var="a"/></custom-block><custom-block s="de-boolean %s"><block var="b"/></custom-block></list></block></block></script></block-definition><block-definition s="LCM (and) %&apos;a&apos; $∧-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Reports the least common multiple of its inputs.&#xD;If the inputs are values in {0,1} then this is equivalent to the logical AND of the values, with 0=False, 1=True.  Hence the APL symbol ∧.&#xD;Also accepts Snap! Booleans as inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple lcm %n %n"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><custom-block s="de-boolean %s"><block var="a"/></custom-block><custom-block s="de-boolean %s"><block var="b"/></custom-block></list></block></block></script></block-definition><block-definition s="NOT $&#126;-1-255-255-0 %&apos;p&apos;" type="reporter" category="operators"><comment x="0" y="0" w="167.33333333333334" collapsed="false">Reports 1 if the input is False or 0;&#xD;otherwise reports 0.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportDifference"><l>1</l><custom-block s="signum $×-1-255-255-0 %n"><block s="reportMonadic"><l><option>abs</option></l><block var="p"/></block></custom-block></block></block></script></block-definition><block-definition s="permutations of %&apos;r&apos; items out of %&apos;n&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="simple permutations of %n items out of %n"><l></l><l></l></custom-block></autolambda><list></list></block></custom-block><list><block var="r"/><block var="n"/></list></block></block></script></block-definition><block-definition s="identity $+-1-255-255-0 %&apos;x&apos;" type="reporter" category="operators"><comment x="0" y="0" w="210.00000000000003" collapsed="false">Reports its input.&#xD;This is useful to fit a value into a different-type input slot, e.g., number into list slot.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportMonadic"><l><option>id</option></l><block var="x"/></block></block></script></block-definition><block-definition s="deep map %&apos;function&apos; over %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="deep map %repRing over %l"><block var="function"/><l/></custom-block></autolambda><list></list></block><block var="data"/></block></block></script><script><block s="doReport"><block s="evaluate"><block var="function"/><list><block var="data"/></list></block></block></script></block></script></block-definition><block-definition s="%&apos;howmany&apos; deal $?-1-255-255-0 %&apos;range&apos;" type="reporter" category="operators"><comment x="0" y="0" w="177.33333333333334" collapsed="false">Report a list with left-input random integers in the range 1 to right-input.&#xD;No number appears more than once&#xD;in the result.  The left input must be less than or equal to the right input.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="%n deal helper %l"><l></l><block s="reportNumbers"><l>1</l><l></l></block></custom-block></autolambda><list></list></block></custom-block><list><block var="howmany"/><block var="range"/></list></block></block></script></block-definition><block-definition s="outer product %&apos;a&apos; $○.-1-255-255-0 %&apos;function&apos; %&apos;b&apos;" type="reporter" category="lists"><comment x="0" y="0" w="297.99999999999994" collapsed="false">Given two arrays A and B, reports an array whose dimensions are&#xD;APPEND(SHAPE OF (A), SHAPE OF (B))&#xD;in which each atomic item of the result is computed by applying the dyadic function input to an item of A and an item of B.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="a"/><l><option>list</option></l></block><script><block s="doIf"><block s="reportListIsEmpty"><block var="a"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block s="reportListItem"><l>1</l><block var="a"/></block><block var="function"/><block var="b"/></custom-block><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block s="reportCDR"><block var="a"/></block><block var="function"/><block var="b"/></custom-block></block></block></script><script><block s="doIfElse"><block s="reportIsA"><block var="b"/><l><option>list</option></l></block><script><block s="doIf"><block s="reportListIsEmpty"><block var="b"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block var="a"/><block var="function"/><block s="reportListItem"><l>1</l><block var="b"/></block></custom-block><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block var="a"/><block var="function"/><block s="reportCDR"><block var="b"/></block></custom-block></block></block></script><script><block s="doReport"><block s="evaluate"><block var="function"/><list><block var="a"/><block var="b"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="head of stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="318.8106770833335" collapsed="false">The stream version of ITEM (1) OF.&#xD;The equivalent of SICP function STREAM-CAR.&#xD;&#xD;This block is one of five lower-level stream blocks, directly interacting with the data structure, hiding it from the higher-level stream blocks.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><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><scripts><script x="10" y="130.6666666666666"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="head of stream %l"><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="tail of stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="461.81067708333336" collapsed="false">The stream version of ALL BUT FIRST OF.&#xD;The equivalent of SICP* function STREAM-CDR.&#xD;&#xD;This block is one of five lower-level stream blocks, directly interacting with the data structure, hiding it from the higher-level stream blocks. The others are: HEAD OF STREAM, IN FRONT OF STREAM, IS STREAM EMPTY?, and THE EMPTY STREAM.&#xD;&#xD;Very Short Introduction To Streams:&#xD;-----------------------------------------------&#xD;Streams, also called lazy lists, are like lists except that items are not computed until they&apos;re needed. This allows for more efficient handling of large computed lists, and even infinite lists.  The only piece of magic is in IN FRONT OF STREAM, whose second input is of type Unevaluated, which means that it&apos;s effectively a procedure, with a sort of invisible gray ring. So HEAD OF STREAM is just ITEM 1 OF, but TAIL OF STREAM has a CALL block to make the computation happen.&#xD;&#xD;For a demo of streams, try the block STREAM DEMO. Plus, each stream block has its own demo(-s), to be accessed from their respective edit windows.&#xD;&#xD;*For a tutorial introduction to streams, read Structure and Interpretation of Computer Programs (SICP), section 3.5 (at the time of writing this Help text, the full text could be read on the internet: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html); or Brian Harvey&apos;s lecture notes (start on page 74): https://people.eecs.berkeley.edu/&#126;bh/61a-pages/Volume2/notes.pdf&#xD;&#xD;As of release 2 of the Streams library, the data structure of streams was simplified, and so were TAIL OF STREAM and IN FRONT OF STREAM. Streams created with release 1 of the library (perhaps stored in a variable, or otherwise) can be used with release 2 blocks; insofar as they were already (partly) evaluated, they will be re-evaluated.</comment><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="doDeclareVariables"><list><l>promise</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="stream"/></block><l><option>script</option></l></block><script><block s="doSetVar"><l>promise</l><block s="reportListItem"><l>2</l><block var="stream"/></block></block><block s="doReplaceInList"><l>2</l><block var="stream"/><l></l></block></script><list></list></block></script></block><block s="doIfElse"><block var="promise"/><script><block s="doReplaceInList"><l>2</l><block var="stream"/><block s="evaluate"><block var="promise"/><list></list></block></block></script><script><block s="doWaitUntil"><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="stream"/></block><l><option>list</option></l></block></block></script></block><block s="doReport"><block s="reportListItem"><l>2</l><block var="stream"/></block></block></script><scripts><script x="7.14285714285711" y="371.85714285714295"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="tail of stream %l"><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></block></script><script x="7.14285714285711" y="435.5714285714287"><custom-block s="$speechBubble %mlt"><l>Former version of TAIL OF STREAM</l></custom-block><custom-block s="$speechBubble %mlt"><l>Formerly, the data structure of a stream consisted of 4 items:&#xD;1. The head, or 1st data item;&#xD;2. The promise, i.e. an unevaluated reporter prescribing the remainder of the stream (like DNA);&#xD;3. A Boolean indicating whether the promise was evaluated yet;&#xD;4. A link to the remainder, or tail, of the stream (if the promise was evaluated), or FALSE (otherwise).&#xD;&#xD;The current data structure is only 2 items:&#xD;1. The head, or 1st data item;&#xD;2. The promise (if not evaluated yet), or link to the tail of the stream (if the promise was evaluated).</l></custom-block><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><list></list></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></scripts></block-definition><block-definition s="%&apos;head&apos; in front of stream %&apos;delayed tail&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="317.6106770833337" collapsed="false">The stream version of IN FRONT OF.&#xD;The equivalent of SICP function CONS-STREAM.&#xD;&#xD;The 2nd input parameter is of type Unevaluated. Therefore, calling IN FRONT OF STREAM causes only the first item of the new stream to be evaluated, not the rest of the stream. The latter will be performed, as required, by TAIL OF STREAM.&#xD;&#xD;This block is one of five lower-level stream blocks, directly interacting with the data structure, hiding it from the higher-level stream blocks.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><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="delayed tail"/></list></block></block></script><scripts><script x="7.142857142857143" y="191.85714285714292"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><l>1</l><custom-block s="stream with numbers from %n"><l>2</l></custom-block></custom-block></block></script><script x="7.142857142857143" y="255.57142857142856"><custom-block s="$speechBubble %mlt"><l>Former version of IN FRONT OF STREAM</l></custom-block><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></scripts></block-definition><block-definition s="comment %&apos;text&apos;" type="command" category="other"><comment x="0" y="0" w="122.00000000000001" collapsed="false">A multiline text block, that doesn’t *do* anything.</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">no comment!</input></inputs></block-definition><block-definition s="the empty stream" type="reporter" category="Streams"><comment x="0" y="0" w="312.8" collapsed="false">A stream without elements.&#xD;&#xD;This block is one of five lower-level stream blocks, directly interacting with the data structure, hiding it for the higher-level stream blocks.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="THE EMPTY STREAM"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>THE EMPTY STREAM</l><block s="reportNewList"><list><l>*the empty stream*</l></list></block></block></script><list></list></block><block s="doReport"><block var="THE EMPTY STREAM"/></block></script><scripts><script x="7.142857142857143" y="152.71666666666675"><custom-block s="comment %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script></scripts></block-definition><block-definition s="$speechBubble %&apos;text&apos;" type="command" category="other"><comment x="0" y="0" w="122.00000000000001" collapsed="false">A multiline text block, that doesn’t *do* anything.</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">no comment!</input></inputs></block-definition><block-definition s="is stream %&apos;stream&apos; empty?" type="predicate" category="Streams"><comment x="0" y="0" w="406.2" collapsed="false">Report if a stream has no elements. &#xD;The stream version of IS EMPTY?.&#xD;The equivalent of SICP function STREAM-NULL?&#xD;&#xD;A stream is considered empty only if it has been computed and is equal to THE EMPTY STREAM.  A stream that has not yet been computed (because it was made with IN FRONT OF STREAM, for example, or with a KEEP whose predicate is never satisfied, isn&apos;t empty even though it may not have any elements.&#xD;&#xD;This block is one of five lower-level stream blocks, directly interacting with the data structure, hiding it for the higher-level stream blocks.&#xD;&#xD;General Info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportVariadicIsIdentical"><list><block var="stream"/><custom-block s="the empty stream"></custom-block></list></block></block></script><scripts><script x="7.142857142857143" y="203.8571428571429"><custom-block s="comment %mlt"><l>Demo</l></custom-block><block s="doReport"><block s="reportNewList"><list><custom-block s="is stream %l empty?"><custom-block s="the empty stream"></custom-block></custom-block><custom-block s="is stream %l empty?"><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block><custom-block s="is stream %l empty?"><custom-block s="stream %mult%s"><list><l></l></list></custom-block></custom-block><custom-block s="is stream %l empty?"><custom-block s="stream %mult%s"><list></list></custom-block></custom-block></list></block></block></script><script x="7.142857142857143" y="322.7619047619048"><custom-block s="comment %mlt"><l>Demo: pathologiocal case (will not terminate)</l></custom-block><block s="doReport"><custom-block s="is stream %l empty?"><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><l></l><l>1</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="stream %&apos;items&apos;" type="reporter" category="Streams" space="true"><comment x="0" y="0" w="343.3333333333333" collapsed="false">Create a stream from a finite collection of items, like the LIST primitive.&#xD;Since this block is typically used for small amounts of data, it does not delay computation of its inputs.&#xD;&#xD;If you are using a list of all the desired values as input, make sure it is specified to be an INPUT LIST&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations>pt:um canal com _&#xD;</translations><inputs><input type="%mult%s" initial="1"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="items"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></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><scripts><script x="10" y="177.01190476190484"><custom-block s="$speechBubble %mlt"><l>Demo: specify individual stream items</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream %mult%s"><list><l>1</l><l>2</l></list></custom-block></custom-block></block></script><script x="10" y="240.72619047619045"><custom-block s="$speechBubble %mlt"><l>Demo: use an input list (list dropped on pair of arrows)</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream %mult%s"><block s="reportNumbers"><l>1</l><l>7</l></block></custom-block></custom-block></block></script><script x="10" y="319.0357142857143"><custom-block s="$speechBubble %mlt"><l>Demo: in contrast with the above, if you drop a list onto an empty slot,&#xD;it will be considered a single item (which may be what you want, but&#xD;usually you want them to be separate items, so use an input list). </l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream %mult%s"><list><block s="reportNumbers"><l>1</l><l>7</l></block></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="stream with numbers from %&apos;start&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="374.6106770833333" collapsed="false">The stream version of NUMBERS FROM () TO (), with no ending number because it reports the infinite stream of all the integers greater than or equal to its input.&#xD;&#xD;Read the code!  It&apos;s deceptively simple.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><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"><custom-block s="%s in front of stream %anyUE"><block var="start"/><custom-block s="stream with numbers from %n"><block s="reportVariadicSum"><list><block var="start"/><l>1</l></list></block></custom-block></custom-block></block></script><scripts><script x="10" y="119.85714285714279"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></block></script><script x="10" y="183.57142857142867"><custom-block s="$speechBubble %mlt"><l>Advanced version supporting both finite and infinite streams</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream with numbers from %n to %n step %n"><l>1</l><l>5</l><l>2</l></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="stream repeating %&apos;items&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="332.66666666666674" collapsed="false">Create an infinite stream repeating a finite collection of items.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations>pt:um canal com _&#xD;</translations><inputs><input type="%mult%s" initial="1"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="items"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></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="$gears HELPER stream repeating %l"><custom-block s="%l followed by %s"><block s="reportCDR"><block var="items"/></block><block s="reportListItem"><l>1</l><block var="items"/></block></custom-block></custom-block></custom-block></block></script><scripts><script x="7.142857142857143" y="193.72619047619045"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream repeating %mult%s"><list><l>A</l><l>b</l><l>3</l></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="generate stream %&apos;function&apos; %&apos;#&apos; w/seeds: %&apos;seeds&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="410.44640066964325" collapsed="false">A highly user-configurable stream generator.&#xD;&#xD;INPUT&#xD;1. Function generating new stream items;&#xD;2. Index (#) of the current item within the stream (may be used by the embedded function);&#xD;3. Seeds, i.e. first items of the stream.&#xD;&#xD;HOW IT WORKS&#xD;E.g. with 2 seeds: when generating item 3, items 1 and 2 are inserted into the 1st and 2nd empty slot, repectively, of the embedded function. When item 4 is generated, items 2 and 3 are inserted … (etc.)&#xD;&#xD;RESULT&#xD;An infinite stream. Open the block editor for an example.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAMS.</comment><header></header><code></code><translations>pt:um canal com os números a partir de _&#xD;</translations><inputs><input type="%repRing">1</input><input type="%upvar"></input><input type="%mult%s"></input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>function*</l><custom-block s="substitute vars %s"><block var="function"/></custom-block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>seeds*</l><block s="reportMonadic"><l><option>id</option></l><block var="seeds"/></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>generate</l><block s="reifyScript"><script><custom-block s="let %upvar $arrowLeft %s"><l>head</l><block s="evaluate"><block s="reportAttributeOf"><block var="function*"/><block s="reportEnvironment"><l><option>script</option></l></block></block><block var="seeds*"/></block></custom-block><block s="doSetVar"><l>seeds*</l><block s="reportCDR"><custom-block s="%l followed by %s"><block var="seeds*"/><block var="head"/></custom-block></block></block><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="head"/><block s="evaluate"><block var="generate"/><list></list></block></custom-block></block></script><list></list></block></custom-block><block s="doSetVar"><l>#</l><block s="reportVariadicSum"><list><block s="reportListAttribute"><l><option>length</option></l><block var="seeds"/></block><l>1</l></list></block></block><block s="doReport"><custom-block s="append streams %mult%anyUE"><list><custom-block s="stream %mult%s"><block var="seeds"/></custom-block><block s="evaluate"><block var="generate"/><list></list></block></list></custom-block></block></script><scripts><script x="7.142857142857143" y="317.57142857142867"><custom-block s="$speechBubble %mlt"><l>Demo: the Fibonacci sequence</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l></l></list></block></autolambda><list></list></block><l>#</l><list><l>1</l><l>1</l></list></custom-block></custom-block></block></script><script x="7.142857142857143" y="404.7142857142855"><custom-block s="$speechBubble %mlt"><l>Demo: squares</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><block var="#"/></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="map %&apos;function&apos; over stream(s) %&apos;streams&apos;" type="reporter" category="Streams" space="true"><comment x="0" y="0" w="290.2106770833335" collapsed="false">The stream version of variadic MAP (any number of input streams, like MULTMAP in the List utilities library).&#xD;&#xD;All input streams must be either infinite or of the same length.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><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" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block s="reportListItem"><l>1</l><block var="streams"/></block></custom-block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="evaluate"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="head of stream %l"><l/></custom-block></autolambda><list></list></block><block var="streams"/></block></block><custom-block s="map %repRing over stream(s) %mult%l"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="tail of stream %l"><l/></custom-block></autolambda><list></list></block><block var="streams"/></block></custom-block></custom-block></block></script><scripts><script x="10" y="231.91666666666666"><custom-block s="$speechBubble %mlt"><l>Demo, 1 input stream</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block><list><custom-block s="stream with numbers from %n"><l>1</l></custom-block></list></custom-block></custom-block></block></script><script x="10" y="334.75000000000006"><custom-block s="$speechBubble %mlt"><l>Demo, 2 input streams</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block><list><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="stream with numbers from %n"><l>11</l></custom-block></list></custom-block></custom-block></block></script><script x="10" y="455.5833333333335"><custom-block s="$speechBubble %mlt"><l> Demo of an integrated version of MAP and KEEP.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><custom-block s="square %n"><l></l></custom-block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script><script x="10" y="612.4166666666667"><custom-block s="$speechBubble %mlt"><l>As of v2 of the Streams library, the block below is obsolete.&#xD;It is kept as a hidden block for upward compatibility with v1.</l></custom-block><custom-block s="$speechBubble %mlt"><custom-block s="map %repRing over stream %mult%l"><block s="reifyReporter"><script></script><list></list></block><list><l/></list></custom-block></custom-block></script></scripts></block-definition><block-definition s="%&apos;variable&apos; $arrowLeft %&apos;value&apos;" type="reporter" category="variables"><comment x="0" y="0" w="94.80000000000001" collapsed="false">Create, and at once initialize, and report, a local variable.</comment><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>variable</l><block var="value"/></block><block s="doReport"><block var="variable"/></block></script></block-definition><block-definition s="flatmap %&apos;function&apos; over stream(s) %&apos;streams&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="344.43169642857157" collapsed="false">Like MAP OVER STREAM(S), but it flattens the result (one level). That is, it requires its first input to be a function that reports a stream, so that MAP would report a stream of streams.  FLATMAP reports a stream whose items are *the items of* the streams reported by that function.&#xD;&#xD;FLATMAP for lists is typically defined using APPEND to join the items of the sublists.  Since streams can be infinite, the substreams can&apos;t be appended.  Instead, FLATMAP uses INTERLEAVE STREAMS to combine the items of the substreams.  Therefore, the order of items in the result is not guaranteed.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l" initial="1"></input></inputs><script><block s="doReport"><custom-block s="$gears flatten stream %l"><custom-block s="map %repRing over stream(s) %mult%l"><block var="function"/><block var="streams"/></custom-block></custom-block></block></script><scripts><script x="7.142857142857143" y="179.8571428571429"><custom-block s="$speechBubble %mlt"><l>Demo: all positive rationals</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="flatmap %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l>/</l><block var="denominator"/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><l></l><block var="denominator"/></custom-block><l>1</l></list></block></autolambda><list></list></block><block s="reifyReporter"><script></script><list></list></block><custom-block s="stream with numbers from %n"><block var="denominator"/></custom-block></custom-block></autolambda><list><l>denominator</l></list></block><list><custom-block s="stream with numbers from %n"><l>1</l></custom-block></list></custom-block></custom-block></block></script><script x="7.142857142857143" y="380.8571428571426"><custom-block s="$speechBubble %mlt"><l>Advanced version, more balanced output</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="$crosshairs flatmap %repRing over stream %l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l>/</l><block var="denominator"/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><l></l><block var="denominator"/></custom-block><l>1</l></list></block></autolambda><list></list></block><block s="reifyReporter"><script></script><list></list></block><custom-block s="stream with numbers from %n"><block var="denominator"/></custom-block></custom-block></autolambda><list><l>denominator</l></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script><script x="7.142857142857143" y="583.9761904761895"><custom-block s="$speechBubble %mlt"><l>A variety of flatmap working for finite substreams only</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="flatmap finite %repRing over stream %l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><block var="#1"/><block var="#2"/></list></block></autolambda><list><l>#1</l></list></block><list><custom-block s="stream with numbers from %n to %n step %n"><l>1</l><block var="#2"/><l>1</l></custom-block></list></custom-block></autolambda><list><l>#2</l></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="map %&apos;function A&apos; over keep %&apos;pred&apos; from map %&apos;function B&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="297.8271484375" collapsed="false">A stream version of Python’s list comprehension, with an extra twist. It runs faster than KEEP from MAP, and MAP over KEEP (and MAP over KEEP from MAP, of course).&#xD;&#xD;- For MAP over KEEP from MAP, use all slots;&#xD;- If all you need is MAP over KEEP, leave the third slot empty. &#xD;- For KEEP from MAP, leave the first slot empty. &#xD;- For MAP over MAP (really?), make the second slot TRUE. &#xD;- For KEEP from MAP over KEEP, use an extra KEEP block.&#xD;- (etc.)&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%predRing"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="function A"/><block s="reifyReporter"><script></script><list></list></block></list></block><script><block s="doReport"><custom-block s="keep %predRing from map %repRing over stream %l"><block var="pred"/><block var="function B"/><block var="stream"/></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="function B"/><block s="reifyReporter"><script></script><list></list></block></list></block><script><block s="doReport"><custom-block s="map %repRing over keep %predRing from stream %l"><block var="function A"/><block var="pred"/><block var="stream"/></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="$gears HELPER map %repRing over keep %predRing from map %repRing over stream %l"><block var="function A"/><block var="pred"/><block var="function B"/><block var="stream"/></custom-block></block></script><scripts><script x="10" y="267.3809523809524"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><custom-block s="square %n"><l></l></custom-block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script><script x="10" y="418.5476190476185"><custom-block s="$speechBubble %mlt"><l>Demo: MAP OVER KEEP</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></autolambda><list></list></block><block s="reifyReporter"><script></script><list></list></block><custom-block s="stream with numbers from %n"><l>15</l></custom-block></custom-block></custom-block></block></script><script x="10" y="569.7142857142843"><custom-block s="$speechBubble %mlt"><l>Demo: KEEP OVER MAP</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><script></script><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><custom-block s="square %n"><l></l></custom-block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep items %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="292.4223958333333" collapsed="false">The stream version of KEEP.&#xD;&#xD;WARNING: If the predicate is such that, beyond a certain point, no other item will ever pass the test, a search with KEEP will not terminate. In such cases, use SEGMENT OF STREAM.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><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="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block><script><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block></script></block><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 %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><scripts><script x="10" y="314.00000000000006"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><l></l><l>2</l></block><l>0</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script><script x="10" y="427.99999999999983"><custom-block s="$speechBubble %mlt"><l> Demo of an integrated version of MAP and KEEP</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><block s="reportTextSplit"><l></l><l><option>letter</option></l></block></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><custom-block s="square %n"><l></l></custom-block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep %&apos;pred&apos; from map %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><custom-block s="%upvar $arrowLeft %s"><l>map result</l><block s="evaluate"><block var="function"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block></custom-block></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="map result"/><custom-block s="keep %predRing from map %repRing over stream %l"><block var="pred"/><block var="function"/><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 %predRing from map %repRing over stream %l"><block var="pred"/><block var="function"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></block></script></block></script><scripts><script x="7.142857142857143" y="334.7738095238096"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><l></l></block></script></scripts></block-definition><block-definition s="delay %&apos;expression&apos; %&apos;time&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%n" initial="1">1</input></inputs><script><block s="doWait"><block var="time"/></block><block s="doReport"><block var="expression"/></block></script></block-definition><block-definition s="%&apos;data&apos; followed by %&apos;value&apos;" type="reporter" category="lists"><comment x="0" y="0" w="187.00000000000003" collapsed="false">The counterpart of IN FRONT OF: returns the first input attached at the back end of the list that is the second input</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="data"/><block s="reportNewList"><list><block var="value"/></list></block></list></block></block></script></block-definition><block-definition s="let %&apos;variable&apos; $arrowLeft %&apos;value&apos;" type="command" category="variables"><comment x="0" y="0" w="256.9999999999998" collapsed="true">Declare and at once intialize a local variable</comment><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>variable</l><block var="value"/></block></script></block-definition><block-definition s="map %&apos;function&apos; over keep %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></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"><block s="evaluate"><block var="function"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block><custom-block s="map %repRing over keep %predRing from stream %l"><block var="function"/><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="map %repRing over keep %predRing from stream %l"><block var="function"/><block var="pred"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></block></script></block></script><scripts><script x="7.14285714285711" y="286.98809523809535"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><l></l></block></script></scripts></block-definition><block-definition s="· %&apos;x&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input></inputs></block-definition><block-definition s="first item+index %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="313.7142857142858" collapsed="false">A combination of FIND FIRST ITEM and INDEX OF, for streams.&#xD;&#xD;INPUTS:  1. condition to be satisfied by item; 2. stream to be searched.&#xD;RESULT: a list of two values: 1. item’s value; 2. index of item within the stream.&#xD;&#xD;If no item within a finite stream satisfies the condition, &quot;&quot; is reported.&#xD;If no item within an *infinite* stream satisfies the condition, the search will not terminate (to prevent this, limit the size of the input stream using SEGMENT OF STREAM).&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAMS.</comment><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>index</l><l>1</l></custom-block><block s="doUntil"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doIf"><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"><block s="reportNewList"><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="index"/></list></block></block></script><list></list></block><block s="doChangeVar"><l>index</l><l>1</l></block><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block></script></block><block s="doReport"><l></l></block></script><scripts><script x="7.142857142857143" y="264.7499999999999"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="first item+index %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><l></l><l>20</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>10</l></custom-block></custom-block></block></script><script x="7.142857142857143" y="351.89285714285694"><custom-block s="$speechBubble %mlt"><l>Demo: not terminating (press the red stop button)</l></custom-block><block s="doReport"><custom-block s="first item+index %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><l></l><l>0</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>10</l></custom-block></custom-block></block></script><script x="7.142857142857143" y="439.0357142857137"><custom-block s="$speechBubble %mlt"><l>Demo: terminating because of search limit</l></custom-block><block s="doReport"><custom-block s="first item+index %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><l></l><l>0</l></list></block></autolambda><list></list></block><custom-block s="segment of stream %l %br starting with first item that %predRing %br ending with next item that %predRing inclusive? %b"><custom-block s="stream with numbers from %n"><l>10</l></custom-block><block s="reifyPredicate"><script></script><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block var="idx"/><l>100</l></list></block></autolambda><list><l>val</l><l>idx</l></list></block><l><bool>false</bool></l></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$gears HELPER map %&apos;function A&apos; over keep %&apos;pred&apos; from map %&apos;function B&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%predRing"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><custom-block s="%upvar $arrowLeft %s"><l>intermediate</l><block s="evaluate"><block var="function B"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block></custom-block></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="evaluate"><block var="function A"/><list><block var="intermediate"/></list></block><custom-block s="$gears HELPER map %repRing over keep %predRing from map %repRing over stream %l"><block var="function A"/><block var="pred"/><block var="function B"/><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="$gears HELPER map %repRing over keep %predRing from map %repRing over stream %l"><block var="function A"/><block var="pred"/><block var="function B"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></block></script></block></script></block-definition><block-definition s="list %&apos;requested&apos; items with %&apos;downstream&apos; of stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="467.05111607142857" collapsed="false">Report a specified number of items from a stream as a list. The “delayed continuation”, starting immediately after the last of the reported items, is made available as an upvar (see inside for demo of continuation; be careful not to use the same identifier for input and upvar continuations).&#xD;&#xD;Replaces SHOW STREAM from version 1 of this library.&#xD;&#xD;The inputs are an integer and a stream. With a positive integer, LIST ... STREAM reports a regular finite list of length less than (for short finite streams) or equal to the integer. It&apos;s useful because an infinite stream can&apos;t be displayed in a finite amount of time.&#xD;&#xD;Alternatively, ”all” (or “Infinity”) may be used as first input, for the showing to continue until the end of the stream will have been reached. Better not try this with infinite streams: the process may never terminate!&#xD;&#xD;Another cause of not terminating:&#xD;1. the input stream is part of a chain of streams AND&#xD;2. the number of elements of the input stream is less than the number of items specified to be reported AND&#xD;3. the first stream of the input chain is infinite.&#xD;For example: LIST ( 10 ) ITEMS OF STREAM ( KEEP ITEMS SUCH THAT ( _ &lt; 5 ) FROM STREAM ( STREAM WITH NUMBERS FROM ( 1 ) ) ).&#xD;Explanation: after the first 4 items, LIST ( 10 ) ITEMS OF STREAM will keep on asking for more input, and STREAM WITH NUMBERS FROM ( 1 ) will keep generating new items forever, each of which will be discarded by KEEP ITEMS SUCH THAT ( _ &lt; 5 ) FROM STREAM, which is the middle part of the chain.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">10<options>all=Infinity</options></input><input type="%upvar" initial="1"></input><input type="%l" initial="1"></input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>items</l><block s="reportNewList"><list></list></block></custom-block><block s="doUntil"><block s="reportVariadicOr"><list><block s="reportVariadicLessThan"><list><block var="requested"/><l>1.5</l></list></block><custom-block s="is stream %l empty?"><block var="stream"/></custom-block></list></block><script><block s="doAddToList"><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="items"/></block><block s="doChangeVar"><l>requested</l><l>-1</l></block><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block></script></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doSetVar"><l>downstream</l><custom-block s="delay %s %n"><custom-block s="the empty stream"></custom-block><l></l></custom-block></block><block s="doReport"><block var="items"/></block></script><list></list></block><block s="doSetVar"><l>downstream</l><custom-block s="delay %s %n"><custom-block s="tail of stream %l"><block var="stream"/></custom-block><l></l></custom-block></block><block s="doReport"><custom-block s="%l followed by %s"><block var="items"/><custom-block s="head of stream %l"><block var="stream"/></custom-block></custom-block></block></script><scripts><script x="10" y="364.15476190476176"><custom-block s="comment %mlt"><l>Demo of primary output</l></custom-block><block s="doReport"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>downstream</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></block></script><script x="10" y="445.8928571428566"><custom-block s="comment %mlt"><l>Demo of downstream, be careful to use CALL.</l></custom-block><custom-block s="ignore %s"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>downstream</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block><custom-block s="ignore %s"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>downstream</l><block s="evaluate"><block var="downstream"/><list></list></block></custom-block></custom-block><block s="doReport"><custom-block s="list %n items with %upvar of stream %l"><l>5</l><l>downstream</l><block s="evaluate"><block var="downstream"/><list></list></block></custom-block></block></script></scripts></block-definition><block-definition s="incrementally combine stream %&apos;stream&apos; $nl using %&apos;combiner&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="409.68571428571425" collapsed="false">This is the stream version of the COMBINE block for lists.&#xD;&#xD;Since lists are finite, it&apos;s always possible to combine *all* items of a list.  For example, given a list of numbers, it&apos;s possible to add all the numbers and report a single number, the sum.&#xD;&#xD;Since a stream can be infinite, it&apos;s not, in general, possible to combine all its items.  Instead, this block reports a stream.  The first item of the result stream is the first item of the input stream; the second item of the result stream is the result of combining the first two items of the input; the third item is the result of combining the first three items; and so on.&#xD;&#xD;INPUTS:&#xD;1. input stream&#xD;2. combiner (function)&#xD;&#xD;RESULT&#xD;A stream. The first element is the head of the input stream. Each following element is calculated by applying the combiner on the preceding *result* item and the value of the current /input/ item:&#xD;&#xD;result (i) = combiner (result (i-1), input (i)).&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%repRing"></input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>combined</l><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="map %repRing over stream(s) %mult%l"><block var="combiner"/><list><block var="combined"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></list></custom-block></custom-block></custom-block><block s="doReport"><block var="combined"/></block></script><scripts><script x="7.142857142857143" y="311.8571428571429"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>5</l><custom-block s="incrementally combine stream %l %br using %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block></custom-block></block></script><script x="7.142857142857143" y="416.9999999999997"><custom-block s="$speechBubble %mlt"><l>Demo: advanced, and somewhat faster, version</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>5</l><custom-block s="$flash integrate %repRing with precursor %s over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block><l></l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="stream with numbers from %&apos;start&apos; to %&apos;end&apos; step %&apos;step&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations>pt:um canal com os números a partir de _&#xD;</translations><inputs><input type="%n">1</input><input type="%n" initial="1">Infinity<options>Infinity</options></input><input type="%n" initial="1">1</input></inputs><script><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportVariadicProduct"><list><block s="reportDifference"><block var="start"/><block var="end"/></block><block var="step"/></list></block><l>0</l></list></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="start"/><custom-block s="stream with numbers from %n to %n step %n"><block s="reportVariadicSum"><list><block var="start"/><block var="step"/></list></block><block var="end"/><block var="step"/></custom-block></custom-block></block></script><scripts><script x="10" y="219.58333333333337"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>downstream</l><custom-block s="stream with numbers from %n to %n step %n"><l>1</l><l>5</l><l>0.5</l></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="uniques of stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="297.604743303572" collapsed="false">The stream version of UNIQUES OF (list).&#xD;&#xD;This implementation though elegant is unsuitable for large data. Edit the block to find a faster but less elegant version.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><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="uniques of stream %l"><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicNotEquals"><list><l></l><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></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><scripts><script x="7.142857142857143" y="230.22619047619048"><custom-block s="$speechBubble %mlt"><l>Demo: from a stream of random integers, UNIQUES OF STREAM picks just the “new” ones.</l></custom-block><block s="doReport"><block s="reportListAttribute"><l><option>sorted</option></l><custom-block s="list %n items of stream %l"><l>30</l><custom-block s="uniques of stream %l"><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportRandom"><l>1</l><l>30</l></block></autolambda><list></list></block><l>#</l><list></list></custom-block></custom-block></custom-block></block></block></script><script x="7.142857142857143" y="361.2738095238094"><custom-block s="$speechBubble %mlt"><l>Demo of a somewhat less elegant, yet faster implementation of UNIQUES OF STREAM&#xD;(edit to see how it works). Also, the defintion of uniqueness may be specified.</l></custom-block><block s="doReport"><block s="reportListAttribute"><l><option>sorted</option></l><custom-block s="list %n items of stream %l"><l>30</l><custom-block s="$flash uniques by %predRing latest 1st? %b of stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicNotEquals"><list><l></l><l></l></list></block></autolambda><list></list></block><l><bool>false</bool></l><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportRandom"><l>1</l><l>30</l></block></autolambda><list></list></block><l>#</l><list></list></custom-block></custom-block></custom-block></block></block></script></scripts></block-definition><block-definition s="map %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="181.33333333333334" collapsed="false">As of v2 of the Streams library, this block is obsolete (kept as a hidden block for upward compatibility from v1).</comment><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" initial="1"></input></inputs><script><block s="doReport"><custom-block s="map %repRing over stream(s) %mult%l"><block var="function"/><block var="stream"/></custom-block></block></script></block-definition><block-definition s="substitute vars %&apos;lambda&apos;" type="reporter" category="variables"><comment x="0" y="0" w="292.8571428571426" collapsed="true">Replace any variable from the caller scope with its value</comment><header></header><code></code><translations></translations><inputs><input type="%s">lambda</input></inputs><script><block s="doReport"><block s="reportJoinWords"><custom-block s="$gears substitute vars %s %s %s"><block s="reportTextSplit"><block var="lambda"/><l><option>blocks</option></l></block><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reportAttributeOf"><block s="reifyReporter"><autolambda><block s="reportEnvironment"><l><option>caller</option></l></block></autolambda><list></list></block><block s="reportEnvironment"><l><option>caller</option></l></block></block></custom-block></block></block></script></block-definition><block-definition s="$gears substitute vars %&apos;blocks&apos; %&apos;internal scope&apos; %&apos;external scope&apos;" type="reporter" category="variables" helper="true"><comment x="0" y="0" w="152.0238095238095" collapsed="false">Replace any variable from the second scope, whose name is not used for a variable within the first scope, with its value.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="blocks"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="blocks"/></block></script><list></list></block><custom-block s="let %upvar $arrowLeft %s"><l>var name</l><block s="reportListItem"><l>2</l><block var="blocks"/></block></custom-block><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="blocks"/></block><block s="reifyReporter"><autolambda><block var=" "/></autolambda><list></list></block></list></block><block s="reportListContainsItem"><block s="reportAttributeOf"><l><option>variables</option></l><block var="external scope"/></block><block var="var name"/></block><block s="reportNot"><block s="reportListContainsItem"><block s="reportAttributeOf"><l><option>variables</option></l><block var="internal scope"/></block><block var="var name"/></block></block></list></block><script><block s="doReport"><custom-block s="blockify %l"><custom-block s="get var %s %s"><block var="var name"/><block var="external scope"/></custom-block></custom-block></block></script><list></list></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="$gears substitute vars %s %s %s"><l></l><block var="internal scope"/><block var="external scope"/></custom-block></autolambda><list></list></block><block var="blocks"/></block></block></script></block-definition><block-definition s="get var %&apos;name&apos; %&apos;ctx&apos;" type="reporter" category="variables" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s">name</input><input type="%s">ctx</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportAttributeOf"><block s="reportJoinWords"><block s="reportNewList"><list><block s="reifyReporter"><autolambda><block var=" "/></autolambda><list></list></block><block var="name"/></list></block></block><block var="ctx"/></block><list></list></block></block></script></block-definition><block-definition s="blockify %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block><block s="reportJoinWords"><list><block s="reifyReporter"><autolambda><block s="reportNewList"><list></list></block></autolambda><list></list></block><block s="reportCONS"><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><block s="reportMap"><block s="reportEnvironment"><l><option>script</option></l></block><block var="data"/></block></block></list></block><block s="reportIfElse"><block s="reportIsA"><block var="data"/><l><option>Boolean</option></l></block><block s="reportJoinWords"><list><block s="reifyPredicate"><autolambda><block s="reportBoolean"><l><bool>true</bool></l></block></autolambda><list></list></block><block var="data"/></list></block><block s="reportIfElse"><block s="reportIsA"><block var="data"/><l><option>script</option></l></block><block s="reportJoinWords"><list><block s="reifyReporter"><autolambda><block s="reifyReporter"><script></script><list></list></block></autolambda><list></list></block><block var="data"/></list></block><block var="data"/></block></block></block></block></script></block-definition><block-definition s="$gears segment of stream %&apos;stream&apos; once %&apos;start condition&apos; until %&apos;end condition&apos; inclusive? %&apos;include&apos; index %&apos;index&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%predRing" initial="1"></input><input type="%predRing"></input><input type="%b" initial="1">false</input><input type="%s" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doIf"><block s="evaluate"><block var="start condition"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="index"/></list></block><script><block s="doReport"><custom-block s="$gears copy stream %l until %predRing inclusive? %b index %s"><block var="stream"/><block var="end condition"/><block var="include"/><l>1</l></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="$gears segment of stream %l once %predRing until %predRing inclusive? %b index %s"><custom-block s="tail of stream %l"><block var="stream"/></custom-block><block var="start condition"/><block var="end condition"/><block var="include"/><block s="reportVariadicSum"><list><block var="index"/><l>1</l></list></block></custom-block></block></script><scripts><script x="10" y="719.1666666666666"><custom-block s="$speechBubble %mlt"><l>By contrast, a version of the above with KEEP&#xD;will not terminate (use red button to stop manually).</l></custom-block><block s="doReport"><l></l></block></script><script x="10" y="791.1666666666666"><custom-block s="$speechBubble %mlt"><l>Demo using the index of each item in the halt condition,&#xD;and not including the final item: (3, 4, 5, 6)</l></custom-block><block s="doReport"><l></l></block></script></scripts></block-definition><block-definition s="$gears copy stream %&apos;stream&apos; until %&apos;end condition&apos; inclusive? %&apos;include&apos; index %&apos;index&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%predRing"></input><input type="%b" initial="1">false</input><input type="%s" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="evaluate"><block var="end condition"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="index"/></list></block></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="$gears copy stream %l until %predRing inclusive? %b index %s"><custom-block s="tail of stream %l"><block var="stream"/></custom-block><block var="end condition"/><block var="include"/><block s="reportVariadicSum"><list><block var="index"/><l>1</l></list></block></custom-block></custom-block></block></script><list></list></block><block s="doIf"><block var="include"/><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="the empty stream"></custom-block></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><scripts><script x="10" y="719.1666666666666"><custom-block s="$speechBubble %mlt"><l>By contrast, a version of the above with KEEP&#xD;will not terminate (use red button to stop manually).</l></custom-block><block s="doReport"><l></l></block></script><script x="10" y="791.1666666666666"><custom-block s="$speechBubble %mlt"><l>Demo using the index of each item in the halt condition,&#xD;and not including the final item: (3, 4, 5, 6)</l></custom-block><block s="doReport"><l></l></block></script></scripts></block-definition><block-definition s="$flash uniques by %&apos;comparator&apos; latest 1st? %&apos;latest 1st&apos; of stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="363.8571428571429" collapsed="false">Reports &quot;unique&quot; items from a stream. An item&apos;s unicity is defined as it satisfying the specified condition (&quot;comparator&quot;) against any of the earlier reported items.&#xD;&#xD;Within the comparator, the first empty slot denotes the current item, the second empty slot denotes any of the earlier reported items.&#xD;&#xD;With the comparator ring left empty, the default comparator is _ ≠ _.&#xD;&#xD;If the switch “latest 1st” is true, each input item is compared with the latest of all earlier results, then with the second latest, and so on. If the switch is false, the first cimparison will be with the oldest of all earlier results. Though this will not influence nthe outcome, one of the approaches is probably faster.</comment><header></header><code></code><translations></translations><inputs><input type="%predRing" initial="1"></input><input type="%b" initial="1">true</input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="$gears HELPER $flash uniques by %predRing of stream %l %l %repRing"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="comparator"/><block s="reifyPredicate"><script></script><list></list></block></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicNotEquals"><list><l></l><l></l></list></block></autolambda><list></list></block><block var="comparator"/></block><block var="stream"/><block s="reportNewList"><list></list></block><block s="reportIfElse"><block var="latest 1st"/><block s="reifyReporter"><autolambda><block s="reportCONS"><l></l><l/></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><custom-block s="%s following %l"><l></l><l/></custom-block></autolambda><list></list></block></block></custom-block></block></script><scripts><script x="7.142857142857143" y="191.8571428571429"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><block s="reportListAttribute"><l><option>sorted</option></l><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="$flash uniques by %predRing latest 1st? %b of stream %l"><block s="reifyPredicate"><script></script><list></list></block><l><bool>true</bool></l><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportRandom"><l>1</l><l>10</l></block></autolambda><list></list></block><l>#</l><list></list></custom-block></custom-block></custom-block></block></block></script><script x="7.142857142857143" y="328.3095238095242"><custom-block s="$speechBubble %mlt"><l>Demo: only new record highs - note the comparator!</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="$flash uniques by %predRing latest 1st? %b of stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><l></l><l></l></list></block></autolambda><list></list></block><l><bool>true</bool></l><custom-block s="stream %mult%s"><list><l>3</l><l>1</l><l>5</l><l>6</l><l>7</l><l>6</l><l>7</l><l>9</l><l>8</l></list></custom-block></custom-block></custom-block></block></script><script x="7.142857142857143" y="433.4523809523809"><custom-block s="$speechBubble %mlt"><l>Demo: alternative implementation of SIEVE.&#xD;For efficiency, each input item is compared with the oldest of earlier results (= 2) first.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>100</l><custom-block s="$flash uniques by %predRing latest 1st? %b of stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicNotEquals"><list><block s="reportModulus"><l></l><l></l></block><l>0</l></list></block></autolambda><list></list></block><l><bool>false</bool></l><custom-block s="stream with numbers from %n"><l>2</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$gears HELPER $flash uniques by %&apos;comparator&apos; of stream %&apos;stream&apos; %&apos;history&apos; %&apos;appender&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%predRing" initial="1"></input><input type="%l"></input><input type="%l"></input><input type="%repRing" initial="1">true</input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doUntil"><block s="reportVariadicEquals"><list><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="evaluate"><block var="comparator"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><l></l></list></block></block></autolambda><list></list></block><block var="history"/></block><l></l></list></block><script><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block></script></block><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="$gears HELPER $flash uniques by %predRing of stream %l %l %repRing"><block var="comparator"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block><block s="evaluate"><block var="appender"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="history"/></list></block><block var="appender"/></custom-block></custom-block></block></script></block-definition><block-definition s="$flash integrate %&apos;combiner&apos; with precursor %&apos;precursor&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="113.57142857142865" collapsed="false">An advanced version of INCREMENTALLY COMBINE. The functional difference isi the “precursor”, the would-be item (0) of the result stream.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing" initial="1"></input><input type="%s" initial="1"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="%upvar $arrowLeft %s"><l>head</l><block s="evaluate"><block var="combiner"/><list><block var="precursor"/><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block></custom-block><custom-block s="$flash integrate %repRing with precursor %s over stream %l"><block var="combiner"/><block var="head"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></custom-block></block></script><scripts><script x="7.142857142857143" y="246.24999999999997"><custom-block s="$speechBubble %mlt"><l>Demo: advanced, and somewhat faster, version</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>5</l><custom-block s="$flash integrate %repRing with precursor %s over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block><l>A.</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="append streams %&apos;streams&apos;" type="reporter" category="Streams" space="true"><comment x="0" y="0" w="179.46770833333343" collapsed="false">Append any number of streams.&#xD;&#xD;To be used only if all streams but the last are finite; otherwise use INTERLEAVE STREAMS.&#xD;&#xD;General info in streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%anyUE" initial="2"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="streams"/></block></block><script><block s="doReport"><block s="reportIfElse"><block s="reportListIsEmpty"><block var="streams"/></block><custom-block s="the empty stream"></custom-block><block s="evaluate"><block s="reportListItem"><l>1</l><block var="streams"/></block><list></list></block></block></block></script><list><custom-block s="is stream %l empty?"><custom-block s="%upvar $arrowLeft %s"><l>first</l><block s="evaluate"><block s="reportListItem"><l>1</l><block var="streams"/></block><list></list></block></custom-block></custom-block><script><block s="doReport"><custom-block s="append streams %mult%anyUE"><block s="reportCDR"><block var="streams"/></block></custom-block></block></script></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="first"/></custom-block><custom-block s="append streams %mult%anyUE"><block s="reportCONS"><custom-block s="delay %s %n"><custom-block s="tail of stream %l"><block var="first"/></custom-block><l></l></custom-block><block s="reportCDR"><block var="streams"/></block></block></custom-block></custom-block></block></script><scripts><script x="13.333333333333307" y="437.25000000000017"><custom-block s="$speechBubble %mlt"><l>An example with several input streams</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="append streams %mult%anyUE"><list><custom-block s="the empty stream"></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block><custom-block s="stream %mult%s"><list><l>11</l></list></custom-block><custom-block s="stream with numbers from %n"><l>21</l></custom-block></list></custom-block></custom-block></block></script><script x="12.666666666666679" y="321.0833333333333"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="append streams %mult%anyUE"><list><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block><custom-block s="stream with numbers from %n"><l>11</l></custom-block></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$crosshairs flatmap %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="293.003125" collapsed="false">A variation of FLATMAP delivering a more even distribution of output items over mapped substreams.&#xD;Applicable only if function (input 1) will create streams.&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="$crosshairs flatten stream %l"><custom-block s="map %repRing over stream(s) %mult%l"><block var="function"/><list><block var="stream"/></list></custom-block></custom-block></block></script><scripts><script x="10" y="103"><custom-block s="$speechBubble %mlt"><l>Demo: all positive rationals</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="$crosshairs flatmap %repRing over stream %l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l>/</l><block var="denominator"/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><l></l><block var="denominator"/></custom-block><l>1</l></list></block></autolambda><list></list></block><block s="reifyReporter"><script></script><list></list></block><custom-block s="stream with numbers from %n"><block var="denominator"/></custom-block></custom-block></autolambda><list><l>denominator</l></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$crosshairs flatten stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="118.24374999999998" collapsed="false">A variation of FLATTEN STREAM delivering a more balanced distribution of output items among substreams.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>stream*</l><l>substreams</l><l>insert counter</l></list></block><block s="doSetVar"><l>substreams</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>stream*</l><block var="stream"/></block><custom-block s="let %upvar $arrowLeft %s"><l>add substream if applicable</l><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block var="insert counter"/><l>0</l></list></block><block s="reportNot"><custom-block s="is stream %l empty?"><block var="stream*"/></custom-block></block></list></block><script><block s="doSetVar"><l>substreams</l><block s="reportCONS"><custom-block s="head of stream %l"><block var="stream*"/></custom-block><block var="substreams"/></block></block><block s="doSetVar"><l>stream*</l><custom-block s="tail of stream %l"><block var="stream*"/></custom-block></block><block s="doSetVar"><l>insert counter</l><block s="reportListAttribute"><l><option>length</option></l><block var="substreams"/></block></block></script><list></list></block><block s="doChangeVar"><l>insert counter</l><l>-1</l></block></script><list></list></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>remove empty substreams</l><block s="reifyScript"><script><block s="doUntil"><block s="reportVariadicOr"><list><block s="reportListIsEmpty"><block var="substreams"/></block><block s="reportNot"><custom-block s="is stream %l empty?"><block s="reportListItem"><l>1</l><block var="substreams"/></block></custom-block></block></list></block><script><block s="doSetVar"><l>substreams</l><block s="reportCDR"><block var="substreams"/></block></block></script></block></script><list></list></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>flatten*</l><block s="reifyScript"><script><block s="doRun"><block var="add substream if applicable"/><list></list></block><block s="doRun"><block var="remove empty substreams"/><list></list></block><block s="doIf"><block s="reportListIsEmpty"><block var="substreams"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><block s="doSetVar"><l>substreams</l><custom-block s="round robin %l"><block var="substreams"/></custom-block></block><custom-block s="let %upvar $arrowLeft %s"><l>result</l><custom-block s="head of stream %l"><block s="reportListItem"><l>1</l><block var="substreams"/></block></custom-block></custom-block><block s="doReplaceInList"><l>1</l><block var="substreams"/><custom-block s="tail of stream %l"><block s="reportListItem"><l>1</l><block var="substreams"/></block></custom-block></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="result"/><block s="evaluate"><block var="flatten*"/><list></list></block></custom-block></block></script><list></list></block></custom-block><block s="doReport"><block s="evaluate"><block var="flatten*"/><list></list></block></block></script></block-definition><block-definition s="flatmap finite %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="293.003125" collapsed="false">Create a stream that is the result of appending (rather tah interleaving) streams mapped over the input stream.&#xD;Will only be applicable if function (input 1) will create *finite* streams.&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="append substreams of %l"><custom-block s="map %repRing over stream(s) %mult%l"><block var="function"/><list><block var="stream"/></list></custom-block></custom-block></block></script><scripts><script x="10" y="115.00000000000001"><custom-block s="$speechBubble %mlt"><l>non-descending integer pairs</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="flatmap finite %repRing over stream %l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><block var="#1"/><block var="#2"/></list></block></autolambda><list><l>#1</l></list></block><list><custom-block s="stream with numbers from %n to %n step %n"><l>1</l><block var="#2"/><l>1</l></custom-block></list></custom-block></autolambda><list><l>#2</l></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="round robin %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input></inputs><script><block s="doReport"><custom-block s="%l followed by %s"><block s="reportCDR"><block var="data"/></block><block s="reportListItem"><l>1</l><block var="data"/></block></custom-block></block></script></block-definition><block-definition s="interleave streams %&apos;streams&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="293.70580357142853" collapsed="false">Alternately report items from each stream.&#xD;A generalization of SICP function INTERLEAVE-DELAYED.&#xD;&#xD;For finite lists, the way to make one list combining the items from several input lists is to APPEND them.  But that doesn&apos;t work for possibly infinite streams; if the first stream is infinite, no items from the second or additional input streams would be included.  Instead, you have to INTERLEAVE the streams, take an item from the first one, an item from the second one, and so on.  This ensures that every item of every stream will turn up eventually in the result stream.&#xD;&#xD;This block makes no guarantees regarding the precise order in which items appear in the result stream.&#xD;&#xD;General info in streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%anyUE" initial="2"></input></inputs><script><block s="doReport"><custom-block s="$gears HELPER interleave streams %l"><block var="streams"/></custom-block></block></script><scripts><script x="7.142857142857143" y="239.8571428571429"><custom-block s="$speechBubble %mlt"><l>Simple code for INTERLEAVE STREAMS (a ⋮) (b λ)</l></custom-block><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><block s="evaluate"><block var="b"/><list></list></block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="interleave streams %mult%anyUE"><list><block s="evaluate"><block var="b"/><list></list></block><custom-block s="tail of stream %l"><block var="a"/></custom-block></list></custom-block></custom-block></block></script><script x="7.142857142857143" y="393.7023809523809"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="interleave streams %mult%anyUE"><list><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block><custom-block s="stream with numbers from %n"><l>11</l></custom-block></list></custom-block></custom-block></block></script><script x="7.142857142857143" y="486.01190476190453"><custom-block s="$speechBubble %mlt"><l>An example with several input streams</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="interleave streams %mult%anyUE"><list><custom-block s="the empty stream"></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block><custom-block s="stream %mult%s"><list><l>11</l></list></custom-block><custom-block s="stream with numbers from %n"><l>21</l></custom-block></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="append substreams of %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doReport"><custom-block s="append streams %mult%anyUE"><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="append substreams of %l"><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></list></custom-block></block></script></block-definition><block-definition s="merge streams %&apos;streams&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="160.80000000000024" collapsed="false">Merge 2 streams, in ascending order (as established by “_ &lt; _”).&#xD;&#xD;For the result stream to be in ascending (or non-descending) order, both of the input streams must be.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAMS.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l" initial="2"></input></inputs><script><block s="doSetVar"><l>streams</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><custom-block s="is stream %l empty?"><l/></custom-block></block></autolambda><list></list></block><block var="streams"/></block></block><block s="doIf"><block s="reportListIsEmpty"><block var="streams"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list><block s="reportListIsEmpty"><block s="reportCDR"><block var="streams"/></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="streams"/></block></block></script></list></block><custom-block s="let %upvar $arrowLeft %s"><l>keys</l><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="head of stream %l"><l/></custom-block></autolambda><list></list></block><block var="streams"/></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>kv-pairs</l><custom-block s="$flash sort %l ordering with %predRing"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportNewList"><list><block var="keys"/><block var="streams"/></list></block></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block></custom-block></custom-block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block><custom-block s="merge streams %mult%l"><block s="reportCONS"><custom-block s="tail of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><block s="reportCDR"><block var="kv-pairs"/></block></block></block></custom-block></custom-block></block></script><scripts><script x="20" y="578.8888888888887"><custom-block s="$speechBubble %mlt"><l>Simple code for MERGE STREAMS (a) (b)</l></custom-block><block s="doIf"><block s="reportVariadicOr"><list><custom-block s="is stream %l empty?"><block var="a"/></custom-block><custom-block s="is stream %l empty?"><block var="b"/></custom-block></list></block><script><block s="doReport"><custom-block s="append streams %mult%anyUE"><list><block var="a"/><block var="b"/></list></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicLessThan"><list><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="head of stream %l"><block var="b"/></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="a"/></custom-block><custom-block s="merge streams %mult%l"><list><block var="b"/><custom-block s="tail of stream %l"><block var="a"/></custom-block></list></custom-block></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="b"/></custom-block><custom-block s="merge streams %mult%l"><list><block var="a"/><custom-block s="tail of stream %l"><block var="b"/></custom-block></list></custom-block></custom-block></block></script><script x="20" y="833.2777777777782"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="merge streams %mult%l"><list><custom-block s="stream with numbers from %n"><l>5</l></custom-block><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l></l></list></block></autolambda><list></list></block><list><custom-block s="stream with numbers from %n"><l>1</l></custom-block></list></custom-block></list></custom-block></custom-block></block></script><script x="20" y="974.7222222222226"><custom-block s="$speechBubble %mlt"><l>Advanced version</l></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>original case sensitivity</l><block s="reportGlobalFlag"><l><option>case sensitivity</option></l></block></custom-block><block s="doSetGlobalFlag"><l><option>case sensitivity</option></l><l><bool>true</bool></l></block><custom-block s="let %upvar $arrowLeft %s"><l>result</l><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="merge streams %mult%l %br ordered by %repRing uniques? %b by %predRing"><list><custom-block s="stream %mult%s"><list><l>a</l><l>a</l><l>A</l></list></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>B</l><l>C</l><l>c</l></list></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block></list><block s="reifyReporter"><autolambda><block s="reportTextAttribute"><l><option>lower case</option></l><l></l></block></autolambda><list></list></block><l><bool>true</bool></l><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block></custom-block></custom-block><block s="doSetGlobalFlag"><l><option>case sensitivity</option></l><block var="original case sensitivity"/></block><block s="doReport"><block var="result"/></block></script></scripts></block-definition><block-definition s="$gears flatten stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="293.003125" collapsed="false">Interleave streams that are themselves elements of a stream, such that they become one stream.&#xD;Does not work on streams whose 1st level items are not (all) streams.&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="stream"/></block></script><list></list></block><block s="doReport"><custom-block s="interleave streams %mult%anyUE"><list><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="$gears flatten stream %l"><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></list></custom-block></block></script></block-definition><block-definition s="list %&apos;requested&apos; items of stream %&apos;stream&apos;" type="reporter" category="Streams" space="true"><comment x="0" y="0" w="471.3368303571429" collapsed="false">Reports a list containing a specified number of items from a stream.&#xD;&#xD;Replaces SHOW STREAM from version 1 of this library.&#xD;&#xD;The inputs are an integer and a stream. With a positive integer, LIST ... STREAM reports a regular finite list of length less than (for shorter finite streams) or equal to the integer. It&apos;s useful because an infinite stream can&apos;t be displayed in a finite amount of time.&#xD;&#xD;Alternatively, ”all” (or “Infinity”) may be used as first input, for the showing to continue until the end of the stream will have been reached. Better not try this with infinite streams: the process will never terminate.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">10<options>all=Infinity</options></input><input type="%l" initial="1"></input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>items</l><block s="reportNewList"><list></list></block></custom-block><block s="doUntil"><block s="reportVariadicOr"><list><block s="reportVariadicLessThan"><list><block var="requested"/><l>1.5</l></list></block><custom-block s="is stream %l empty?"><block var="stream"/></custom-block></list></block><script><block s="doAddToList"><custom-block s="head of stream %l"><block var="stream"/></custom-block><block var="items"/></block><block s="doChangeVar"><l>requested</l><l>-1</l></block><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block></script></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doReport"><block var="items"/></block></script><list></list></block><block s="doReport"><custom-block s="%l followed by %s"><block var="items"/><custom-block s="head of stream %l"><block var="stream"/></custom-block></custom-block></block></script><scripts><script x="20" y="353"><custom-block s="comment %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></block></script><script x="20" y="421"><custom-block s="comment %mlt"><l>Demo: the number of items requested is exactly the length of the stream</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream %mult%s"><block s="reportNumbers"><l>1</l><l>10</l></block></custom-block></custom-block></block></script><script x="20" y="503.8333333333332"><custom-block s="comment %mlt"><l>Demo: the length of a *finite* stream is less than &#xD;the number of items requested.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="stream %mult%s"><block s="reportNumbers"><l>1</l><l>5</l></block></custom-block></custom-block></block></script><script x="20" y="598.6666666666669"><custom-block s="comment %mlt"><l>Demo: the length of an *infinite* stream is less than &#xD;the number of items requested. The process will not terminate.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><l></l><l>6</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script><script x="20" y="713.5"><custom-block s="comment %mlt"><l>Advanced version, enabling continuation.</l></custom-block><custom-block s="ignore %s"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>continuation</l><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block><custom-block s="ignore %s"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>continuation*</l><block s="evaluate"><block var="continuation"/><list></list></block></custom-block></custom-block><block s="doReport"><custom-block s="list %n items with %upvar of stream %l"><l>5</l><l>continuation</l><block s="evaluate"><block var="continuation*"/><list></list></block></custom-block></block></script></scripts></block-definition><block-definition s="merge streams %&apos;streams&apos; $nl ordered by %&apos;key function&apos; uniques? %&apos;uniques&apos; by %&apos;distinguisher&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="406.8000000000002" collapsed="false">Merge any nunber of streams, ordered by key (ascending)&#xD;&#xD;INPUT&#xD;1. streams to be merged. For the algorithm to work, each of the streams must be pre-ordered by the same key function.&#xD;2. a reporter (“key function”) assigning a key to be sorted by, to each input stream item&#xD;3. switch indicating whether output items should be unique, as compared to previous items.&#xD;4. ”distinguisher”, a two-iitem predicate indicating whether one item is considered unique as compared to another item (default: “_ = _”).&#xD;RESULT&#xD;A stream of items from the input streams, ordered by the same key function, and possibly filtered for uniqueness.&#xD;REMARK &#xD;Keys are sorted in ascending order as established by “_ &lt; _”.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAMS.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l" initial="2"></input><input type="%repRing" initial="1"></input><input type="%b" initial="1">true</input><input type="%predRing" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>head</l><l>key</l><l>pre-key</l><l>local history</l></list></block><block s="doUntil"><block s="reportVariadicOr"><list><block s="reportListIsEmpty"><block var="streams"/></block><block s="reportNot"><custom-block s="is stream %l empty?"><block s="reportListItem"><l>1</l><block var="streams"/></block></custom-block></block></list></block><script><block s="doSetVar"><l>streams</l><block s="reportCDR"><block var="streams"/></block></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="streams"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list><block s="reportVariadicAnd"><list><block s="reportListIsEmpty"><block s="reportCDR"><block var="streams"/></block></block><block s="reportNot"><block var="uniques"/></block></list></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="streams"/></block></block></script></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="distinguisher"/><l></l></list></block><script><block s="doSetVar"><l>distinguisher</l><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><l></l><l></l></list></block></autolambda><list></list></block></block></script><list></list></block><custom-block s="let %upvar $arrowLeft %s"><l>keys</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><l/></custom-block></list></block></autolambda><list></list></block><block var="streams"/></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>kv-pairs</l><custom-block s="$flash sort %l ordering with %predRing"><block s="reportListAttribute"><l><option>columns</option></l><block s="reportNewList"><list><block var="keys"/><block var="streams"/></list></block></block><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block></custom-block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>merge*</l><block s="reifyScript"><script><block s="doSetVar"><l>pre-key</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></block><block s="doIf"><custom-block s="is stream %l empty?"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block><script><block s="doSetVar"><l>kv-pairs</l><block s="reportCDR"><block var="kv-pairs"/></block></block><block s="doIf"><block s="reportListIsEmpty"><block var="kv-pairs"/></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list><block s="reportVariadicAnd"><list><block s="reportListIsEmpty"><block s="reportCDR"><block var="kv-pairs"/></block></block><block s="reportNot"><block var="uniques"/></block></list></block><script><block s="doReport"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></block></script></list></block></script><list></list></block><block s="doReplaceInList"><l>1</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block></list></block></block><block s="doSetVar"><l>kv-pairs</l><custom-block s="$flash sort %l ordering with %predRing"><block var="kv-pairs"/><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block></custom-block></block><block s="doSetVar"><l>head</l><custom-block s="head of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block></block><block s="doSetVar"><l>key</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></block><block s="doReplaceInList"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block><custom-block s="tail of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block></block><block s="doIf"><block s="reportVariadicAnd"><list><block var="uniques"/><block s="reportVariadicEquals"><list><block var="key"/><block var="pre-key"/></list></block></list></block><script><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="evaluate"><block var="distinguisher"/><list><block var="head"/><l></l></list></block></autolambda><list></list></block><block var="local history"/></block><l></l></list></block><script><block s="doAddToList"><block var="head"/><block var="local history"/></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="head"/><block s="evaluate"><block var="merge*"/><list></list></block></custom-block></block></script><list></list></block><block s="doReport"><block s="evaluate"><block var="merge*"/><list></list></block></block></script><list></list></block><block s="doSetVar"><l>local history</l><block s="reportNewList"><list><block var="head"/></list></block></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="head"/><block s="evaluate"><block var="merge*"/><list></list></block></custom-block></block></script><list></list></block></custom-block><block s="doSetVar"><l>head</l><custom-block s="head of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block></block><block s="doSetVar"><l>local history</l><block s="reportNewList"><list><block var="head"/></list></block></block><block s="doReplaceInList"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block><custom-block s="tail of stream %l"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="kv-pairs"/></block></block></custom-block></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="head"/><block s="evaluate"><block var="merge*"/><list></list></block></custom-block></block></script><scripts><script x="7.142857142857143" y="1443.5000000000002"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>original case sensitivity</l><block s="reportGlobalFlag"><l><option>case sensitivity</option></l></block></custom-block><block s="doSetGlobalFlag"><l><option>case sensitivity</option></l><l><bool>true</bool></l></block><custom-block s="let %upvar $arrowLeft %s"><l>result</l><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="merge streams %mult%l %br ordered by %repRing uniques? %b by %predRing"><list><custom-block s="stream %mult%s"><list><l>a</l><l>a</l><l>A</l></list></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>B</l><l>C</l><l>c</l></list></custom-block><custom-block s="stream %mult%s"><list><l>1</l><l>2</l><l>3</l></list></custom-block></list><block s="reifyReporter"><autolambda><block s="reportTextAttribute"><l><option>lower case</option></l><l></l></block></autolambda><list></list></block><l><bool>true</bool></l><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block></custom-block></custom-block><block s="doSetGlobalFlag"><l><option>case sensitivity</option></l><block var="original case sensitivity"/></block><block s="doReport"><block var="result"/></block></script><script x="7.142857142857143" y="1668.7142857142883"><custom-block s="head of stream %l"><l/></custom-block></script><script x="7.142857142857143" y="1694.1428571428594"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="merge streams %mult%l %br ordered by %repRing uniques? %b by %predRing"><list><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l>10</l></list></block></autolambda><list></list></block><l>#</l><list><l>1</l></list></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l>10</l></list></block></autolambda><list></list></block><l>#</l><list><l>3</l></list></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l>10</l></list></block></autolambda><list></list></block><l>#</l><list><l>2</l></list></custom-block></list><block s="reifyReporter"><script></script><list></list></block><l/><block s="reifyPredicate"><script></script><list></list></block></custom-block></custom-block></block></script><script x="7.142857142857143" y="1866.7380952381016"><custom-block s="$speechBubble %mlt"><l>Demo of a related (hidden) block, that will keep any items from the 1st stream&#xD;that also appear in the 2nd (AND relation)</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br AND stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script><script x="7.142857142857143" y="2015.071428571436"><custom-block s="$speechBubble %mlt"><l>Demo of a related (hidden) block, that will keep any items from either of 2 streams (OR relation).&#xD;Items apprearing in both streams will appear in the output only once.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script><script x="7.142857142857143" y="2165.5238095238187"><custom-block s="$speechBubble %mlt"><l>Demo of a related block, that will keep any iems appearing in either of 2 streams,&#xD;but not in both (eXclusive OR relation)</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br XOR stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script><script x="7.142857142857143" y="2313.8571428571536"><custom-block s="$speechBubble %mlt"><l>Demo of a related (hidden) block, keeping any items from the first stream&#xD;that do NOT appear in the second.</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br but NOT stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep items from stream %&apos;a&apos; $nl AND stream %&apos;b&apos; $nl ordered by key %&apos;key function&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%l" initial="1"></input><input type="%repRing" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicOr"><list><custom-block s="is stream %l empty?"><block var="a"/></custom-block><custom-block s="is stream %l empty?"><block var="b"/></custom-block></list></block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><block s="doUntil"><block s="reportVariadicEquals"><list><custom-block s="%upvar $arrowLeft %s"><l>key a</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="a"/></custom-block></list></block></custom-block><custom-block s="%upvar $arrowLeft %s"><l>key b</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="b"/></custom-block></list></block></custom-block></list></block><script><block s="doIfElse"><block s="reportVariadicLessThan"><list><block var="key a"/><block var="key b"/></list></block><script><block s="doSetVar"><l>a</l><custom-block s="tail of stream %l"><block var="a"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block></script><script><block s="doSetVar"><l>b</l><custom-block s="tail of stream %l"><block var="b"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block></script></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="keep items from stream %l %br AND stream %l %br ordered by key %repRing"><custom-block s="tail of stream %l"><block var="a"/></custom-block><custom-block s="tail of stream %l"><block var="b"/></custom-block><block var="key function"/></custom-block></custom-block></block></script><scripts><script x="10" y="557.0833333333333"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br AND stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep items from stream %&apos;a&apos; $nl OR stream %&apos;b&apos; $nl ordered by key %&apos;key function&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%l" initial="1"></input><input type="%repRing" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><block var="b"/></block></script><list><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="%upvar $arrowLeft %s"><l>key a</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="a"/></custom-block></list></block></custom-block><custom-block s="%upvar $arrowLeft %s"><l>key b</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="b"/></custom-block></list></block></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="a"/></custom-block><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><custom-block s="tail of stream %l"><block var="a"/></custom-block><custom-block s="tail of stream %l"><block var="b"/></custom-block><block var="key function"/></custom-block></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicLessThan"><list><block var="key a"/><block var="key b"/></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><custom-block s="tail of stream %l"><block var="a"/></custom-block><block var="b"/><block var="key function"/></custom-block></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="b"/></custom-block><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><block var="a"/><custom-block s="tail of stream %l"><block var="b"/></custom-block><block var="key function"/></custom-block></custom-block></block></script><scripts><script x="10" y="581.8333333333335"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="item %&apos;index&apos; of stream %&apos;stream&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="300.8" collapsed="false">Report a specific item from a stream. (i.e. stream in, item out)&#xD;The inputs are a positive integer (item number), and the stream.&#xD;&#xD;The equivalent of SICP function STREAM-REF.&#xD;&#xD;Note that looking for something in a stream by index isn&apos;t a very &quot;streamly&quot; style of work.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM</comment><header></header><code></code><translations></translations><inputs><input type="%n">1</input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportVariadicLessThan"><list><block var="index"/><l>0.5</l></list></block><script><block s="doReport"><l></l></block></script><list></list></block><block s="doUntil"><block s="reportVariadicOr"><list><block s="reportVariadicLessThan"><list><block var="index"/><l>1.5</l></list></block><custom-block s="is stream %l empty?"><block var="stream"/></custom-block></list></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block></script></block><block s="doReport"><custom-block s="head of stream %l"><block var="stream"/></custom-block></block></script><scripts><script x="7.14285714285711" y="235.72619047619074"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="item %n of stream %l"><l>5</l><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><l></l><l></l></list></block></autolambda><list></list></block><list><custom-block s="stream with numbers from %n"><l>11</l></custom-block></list></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep items from stream %&apos;a&apos; $nl XOR stream %&apos;b&apos; $nl ordered by key %&apos;key function&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%l" initial="1"></input><input type="%repRing" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><block var="b"/></block></script><list><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script></list></block><block s="doUntil"><block s="reportVariadicNotEquals"><list><custom-block s="%upvar $arrowLeft %s"><l>key a</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="a"/></custom-block></list></block></custom-block><custom-block s="%upvar $arrowLeft %s"><l>key b</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="b"/></custom-block></list></block></custom-block></list></block><script><block s="doSetVar"><l>a</l><custom-block s="tail of stream %l"><block var="a"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><block var="b"/></block></script><list></list></block><block s="doSetVar"><l>b</l><custom-block s="tail of stream %l"><block var="b"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script><list></list></block></script></block><block s="doIf"><block s="reportVariadicLessThan"><list><block var="key a"/><block var="key b"/></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="keep items from stream %l %br XOR stream %l %br ordered by key %repRing"><custom-block s="tail of stream %l"><block var="a"/></custom-block><block var="b"/><block var="key function"/></custom-block></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="b"/></custom-block><custom-block s="keep items from stream %l %br XOR stream %l %br ordered by key %repRing"><block var="a"/><custom-block s="tail of stream %l"><block var="b"/></custom-block><block var="key function"/></custom-block></custom-block></block></script><scripts><script x="10" y="667.2500000000002"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br XOR stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="keep items from stream %&apos;a&apos; $nl but NOT stream %&apos;b&apos; $nl ordered by key %&apos;key function&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%l" initial="1"></input><input type="%repRing" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script></list></block><block s="doUntil"><block s="reportVariadicLessThan"><list><custom-block s="%upvar $arrowLeft %s"><l>key a</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="a"/></custom-block></list></block></custom-block><custom-block s="%upvar $arrowLeft %s"><l>key b</l><block s="evaluate"><block var="key function"/><list><custom-block s="head of stream %l"><block var="b"/></custom-block></list></block></custom-block></list></block><script><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="key a"/><block var="key b"/></list></block><script><block s="doSetVar"><l>a</l><custom-block s="tail of stream %l"><block var="a"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><block s="doSetVar"><l>b</l><custom-block s="tail of stream %l"><block var="b"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script><list></list></block></script><script><block s="doSetVar"><l>b</l><custom-block s="tail of stream %l"><block var="b"/></custom-block></block><block s="doIf"><custom-block s="is stream %l empty?"><block var="b"/></custom-block><script><block s="doReport"><block var="a"/></block></script><list></list></block></script></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="keep items from stream %l %br but NOT stream %l %br ordered by key %repRing"><custom-block s="tail of stream %l"><block var="a"/></custom-block><block var="b"/><block var="key function"/></custom-block></custom-block></block></script><scripts><script x="7.142857142857143" y="670.2499999999997"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br but NOT stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="log stream %&apos;stream&apos; $nl to list %&apos;report&apos; labeled %&apos;label&apos; indexed? %&apos;indexed&apos;" type="reporter" category="Streams" space="true"><comment x="0" y="0" w="364.4000000000001" collapsed="false">Eavesdrop on a stream in action.&#xD;&#xD;For debugging purposes only! The log will consume a lot of memory.&#xD;&#xD;INPUTS:&#xD;1. the stream to be inspected&#xD;2. the list to be used as log (put it in a variable watcher to see changes happen)&#xD;3. a label for these log entries (optional: not used if this slot is left empty)&#xD;4. whether each entry into the log will be indexed (default: FALSE)&#xD;&#xD;Reports the input stream, so that it can be inserted in a composition of functions.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input><input type="%txt"></input><input type="%b">false</input></inputs><script><custom-block s="let %upvar $arrowLeft %s"><l>index</l><l>0</l></custom-block><block s="doIf"><custom-block s="is %s empty?"><block var="label"/></custom-block><script><block s="doIf"><block var="indexed"/><script><block s="doReport"><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><script><block s="doChangeVar"><l>index</l><l>1</l></block><block s="doAddToList"><block s="reportNewList"><list><block var="index"/><l></l></list></block><block var="report"/></block><block s="doReport"><l></l></block></script><list></list></block><list><block var="stream"/></list></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><script><block s="doAddToList"><l></l><block var="report"/></block><block s="doReport"><l></l></block></script><list></list></block><list><block var="stream"/></list></custom-block></block></script><list></list></block><block s="doIf"><block var="indexed"/><script><block s="doReport"><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><script><block s="doChangeVar"><l>index</l><l>1</l></block><block s="doAddToList"><block s="reportNewList"><list><block var="label"/><block var="index"/><l></l></list></block><block var="report"/></block><block s="doReport"><l></l></block></script><list></list></block><list><block var="stream"/></list></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><script><block s="doAddToList"><block s="reportNewList"><list><block var="label"/><l></l></list></block><block var="report"/></block><block s="doReport"><l></l></block></script><list></list></block><list><block var="stream"/></list></custom-block></block></script><scripts><script x="10" y="573.9166666666665"><custom-block s="$speechBubble %mlt"><l>Demo: streams before and after KEEP</l></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>log</l><block s="reportNewList"><list></list></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>selection</l><custom-block s="list %n items of stream %l"><l>5</l><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><l></l><l>2</l></block><l>0</l></list></block></autolambda><list></list></block><custom-block s="log stream %l %br to list %l labeled %txt indexed? %b"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><block var="log"/><l></l><l><bool>false</bool></l></custom-block></custom-block></custom-block></custom-block><block s="doReport"><block s="reportNewList"><list><block s="reportCONS"><l>BEFORE:</l><block var="log"/></block><block s="reportCONS"><l>AFTER</l><block var="selection"/></block></list></block></block></script><script x="10" y="762.4166666666665"><custom-block s="$speechBubble %mlt"><l>Demo, with label and index</l></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>log</l><block s="reportNewList"><list></list></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>selection</l><custom-block s="list %n items of stream %l"><l>5</l><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><l></l><l>2</l></block><l>0</l></list></block></autolambda><list></list></block><custom-block s="log stream %l %br to list %l labeled %txt indexed? %b"><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><custom-block s="square %n"><l></l></custom-block></autolambda><list></list></block><list><custom-block s="stream with numbers from %n"><l>1</l></custom-block></list></custom-block><block var="log"/><l>squares</l><l><bool>true</bool></l></custom-block></custom-block></custom-block></custom-block><block s="doReport"><block s="reportCONS"><block s="reportNewList"><list><l>LABEL:</l><l>INDEX:</l><l>VALUE:</l></list></block><block var="log"/></block></block></script></scripts></block-definition><block-definition s="is %&apos;text&apos; empty?" type="predicate" category="operators"><header></header><code></code><translations>de:ist _ leer?&#xD;</translations><inputs><input type="%s">word</input></inputs><script><block s="doReport"><block s="reportVariadicEquals"><list><block var="text"/><l></l></list></block></block></script></block-definition><block-definition s="segment of stream %&apos;stream&apos; $nl starting with first item that %&apos;start condition&apos; $nl ending with next item that %&apos;end condition&apos; inclusive? %&apos;include&apos;" type="reporter" category="Streams"><comment x="0" y="0" w="415.8857142857144" collapsed="false">Reports a segment (a contiguous subset) of the input stream, based on given starting and ending conditions.  One use of this block is to select a finite subset of a potentially infinite stream, which might be necessary to avoid an infinite recursion.&#xD;&#xD;INPUTS:&#xD;1. input stream;&#xD;2. start condition;&#xD;3. end condition;&#xD;4. whether to include the first item satisfying the end condition (default = FALSE)&#xD;&#xD;SPECIFYING THE START AND END CONDITIONS&#xD;The two conditions are predicate functions of two inputs, namely, an item from the stream and that item&apos;s index (position in the stream).  In the start condition, the index is with respect to the input stream; in the end condition, though, the index is taken with respect to the /result/ stream.  If the start condition is empty, the resulting segment starts at the beginning of the input stream.  If the end condition is empty, the resulting segment will reach to the end of the input stream, or will be infinite if the input is infinite.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%predRing" initial="1"></input><input type="%predRing"></input><input type="%b" initial="1">false</input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="end condition"/><block s="reifyPredicate"><script></script><list></list></block></list></block><script><block s="doSetVar"><l>end condition</l><block s="reifyPredicate"><autolambda><block s="reportBoolean"><l><bool>false</bool></l></block></autolambda><list></list></block></block></script><list></list></block><block s="doReport"><custom-block s="$gears segment of stream %l once %predRing until %predRing inclusive? %b index %s"><block var="stream"/><block var="start condition"/><block var="end condition"/><block var="include"/><l>1</l></custom-block></block></script><scripts><script x="7.142857142857143" y="275.8571428571429"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>Infinity</l><custom-block s="segment of stream %l %br starting with first item that %predRing %br ending with next item that %predRing inclusive? %b"><custom-block s="stream with numbers from %n"><l>12</l></custom-block><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><l></l><l>15</l></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block var="index"/><l>10</l></list></block></autolambda><list><l>value</l><l>index</l></list></block><l><bool>false</bool></l></custom-block></custom-block></block></script><script x="7.142857142857143" y="426.21428571428527"><custom-block s="$speechBubble %mlt"><l>Demo: (3, 4, 5)</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="segment of stream %l %br starting with first item that %predRing %br ending with next item that %predRing inclusive? %b"><custom-block s="stream with numbers from %n"><l>3</l></custom-block><block s="reifyPredicate"><script></script><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><l></l><l>5</l></list></block></autolambda><list></list></block><l><bool>false</bool></l></custom-block></custom-block></block></script><script x="7.142857142857143" y="547.3571428571421"><custom-block s="$speechBubble %mlt"><l>By contrast, a version of the above with KEEP&#xD;will not terminate (use red button to stop manually).</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThanOrEquals"><list><l></l><l>5</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>3</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="stream demo" type="command" category="Streams" space="true"><comment x="0" y="0" w="159.66666666666674" collapsed="false">Read the code while running it.&#xD;&#xD;General info on streams: read the help text of TAIL OF STREAM.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>ones</l><l>ints</l><l>primes</l><l>rationals</l><l>hanoi</l></list></block><block s="bubble"><l>Press ▶ after each demonstration … and now, to continue.</l></block><block s="doPauseAll"></block><block s="doSetVar"><l>ones</l><custom-block s="%s in front of stream %anyUE"><l>1</l><block var="ones"/></custom-block></block><custom-block s="$gears show demo %txt %s %n"><l>An infinite stream of ones:</l><block var="ones"/><l>6</l></custom-block><block s="doSetVar"><l>ints</l><custom-block s="%s in front of stream %anyUE"><l>1</l><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l></l></list></block></autolambda><list></list></block><list><block var="ones"/><block var="ints"/></list></custom-block></custom-block></block><custom-block s="$gears show demo %txt %s %n"><l>A stream containing all the positive integers:</l><block var="ints"/><l>9</l></custom-block><block s="doSetVar"><l>primes</l><custom-block s="sieve %l"><custom-block s="stream with numbers from %n"><l>2</l></custom-block></custom-block></block><custom-block s="$gears show demo %txt %s %n"><l>A stream containing all the prime numbers:</l><block var="primes"/><l>12</l></custom-block><block s="doSetVar"><l>rationals</l><custom-block s="%s in front of stream %anyUE"><l>0</l><custom-block s="$crosshairs flatmap %repRing over stream %l"><block s="reifyReporter"><autolambda><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l>/</l><block var="denominator"/></list></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><l></l><block var="denominator"/></custom-block><l>1</l></list></block></autolambda><list></list></block><block s="reifyReporter"><script></script><list></list></block><custom-block s="stream with numbers from %n"><block var="denominator"/></custom-block></custom-block></autolambda><list><l>denominator</l></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block><custom-block s="$gears show demo %txt %s %n"><l>A stream containing all the positive rational numbers:</l><block var="rationals"/><l>15</l></custom-block><block s="doSetVar"><l>hanoi</l><custom-block s="interleave streams %mult%anyUE"><list><block var="ones"/><custom-block s="map %repRing over stream(s) %mult%l"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l>1</l></list></block></autolambda><list></list></block><list><block var="hanoi"/></list></custom-block></list></custom-block></block><custom-block s="$gears show demo %txt %s %n"><l>A stream showing which disc to move next in an infinitely tall ”Towers of Hanoi” puzzle:</l><block var="hanoi"/><l>15</l></custom-block><block s="doSayFor"><l>Demo finished.</l><l>2</l></block></script></block-definition><block-definition s="sieve %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="300" collapsed="false">Call this block with STREAM WITH NUMBERS FROM 2&#xD;as its input to get the infinite stream of all the prime numbers.&#xD;&#xD;It&apos;s called SIEVE because the algorithm it uses is the Sieve of&#xD;Eratosthenes: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAM.</comment><header></header><code></code><translations>pt:a crivagem do canal _&#xD;</translations><inputs><input type="%l"></input></inputs><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 %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block s="reportModulus"><l></l><custom-block s="head of stream %l"><block var="stream"/></custom-block></block><l>0</l></list></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><scripts><script x="10" y="171.28571428571436"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="sieve %l"><custom-block s="stream with numbers from %n"><l>2</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$gears show demo %&apos;description&apos; %&apos;demo&apos; %&apos;howmany&apos;" type="command" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%s"></input><input type="%n"></input></inputs><script><block s="doSayFor"><block var="description"/><l>2</l></block><block s="doSayFor"><l></l><l>0.5</l></block><block s="bubble"><custom-block s="show stream %l %n"><block var="demo"/><block var="howmany"/></custom-block></block><block s="doPauseAll"></block><block s="bubble"><l></l></block></script></block-definition><block-definition s="show stream %&apos;stream&apos; %&apos;requested&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="181.33333333333334" collapsed="false">As of v2 of the Streams library, this block is obsolete (kept as a hidden block for upward compatibility with v1).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n">10</input></inputs><script><block s="doReport"><custom-block s="list %n items of stream %l"><block var="requested"/><block var="stream"/></custom-block></block></script></block-definition><block-definition s="MORE stream blocks …" type="reporter" category="Streams"><comment x="0" y="0" w="62" collapsed="true">Edit me.</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="$speechBubble %mlt %cs"><l>for upward compatibility with library v1!</l><script><custom-block s="· %anyUE"><custom-block s="map %repRing over stream %mult%l"><block s="reifyReporter"><script></script><list></list></block><list><l/></list></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="keep items such that %predRing from stream %l"><block s="reifyPredicate"><script></script><list></list></block><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="show stream %l %n"><l/><l>10</l></custom-block></custom-block></script></custom-block><custom-block s="$speechBubble %mlt %cs"><l>create streams</l><script><custom-block s="· %anyUE"><custom-block s="stream with numbers from %n to %n step %n"><l>1</l><l>Infinity</l><l>1</l></custom-block></custom-block></script></custom-block><custom-block s="$speechBubble %mlt %cs"><l>higher order functions and UNIQUES</l><script><custom-block s="· %anyUE"><custom-block s="map %repRing over keep %predRing from map %repRing over stream %l"><block s="reifyReporter"><script></script><list></list></block><block s="reifyPredicate"><script></script><list></list></block><block s="reifyReporter"><script></script><list></list></block><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="$crosshairs flatmap %repRing over stream %l"><block s="reifyReporter"><script></script><list></list></block><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="flatmap finite %repRing over stream %l"><block s="reifyReporter"><script></script><list></list></block><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="$flash uniques by %predRing latest 1st? %b of stream %l"><block s="reifyPredicate"><script></script><list></list></block><l/><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="$flash integrate %repRing with precursor %s over stream %l"><block s="reifyReporter"><script></script><list></list></block><l></l><l/></custom-block></custom-block></script></custom-block><custom-block s="$speechBubble %mlt %cs"><l>mix streams</l><script><custom-block s="· %anyUE"><custom-block s="merge streams %mult%l %br ordered by %repRing uniques? %b by %predRing"><list><l/><l/></list><block s="reifyReporter"><script></script><list></list></block><l/><block s="reifyPredicate"><script></script><list></list></block></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="keep items from stream %l %br %s stream %l %br ordered by key %repRing"><l/><l>AND</l><l/><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></script></custom-block><custom-block s="$speechBubble %mlt %cs"><l>selectors</l><script><custom-block s="· %anyUE"><custom-block s="list %n items with %upvar of stream %l"><l>10</l><l>downstream</l><l/></custom-block></custom-block><custom-block s="· %anyUE"><block s="reifyScript"><script><custom-block s="%upvar for each %upvar in stream %l %cs"><l>#</l><l>item</l><l/><script></script></custom-block></script><list></list></block></custom-block></script></custom-block><custom-block s="$speechBubble %mlt %cs"><l>demos</l><script><custom-block s="· %anyUE"><custom-block s="sorted stream from unsorted list %l"><l/></custom-block></custom-block><custom-block s="· %anyUE"><custom-block s="sieve %l"><l/></custom-block></custom-block></script></custom-block><block s="doReport"><l>Edit me!</l></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="239.42239583333335" collapsed="false">As of v2 of the Streams Library, this function as been superseded by KEEP ITEMS () FROM STREAM ().</comment><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="doReport"><custom-block s="keep items %predRing from stream %l"><block var="pred"/><block var="stream"/></custom-block></block></script><scripts><script x="10" y="95.66666666666663"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items such that %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><l></l><l>2</l></block><l>0</l></list></block></autolambda><list></list></block><custom-block s="stream with numbers from %n"><l>1</l></custom-block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$gears HELPER stream repeating %&apos;items&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations>pt:um canal com _&#xD;</translations><inputs><input type="%l">help</input></inputs><script><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="$gears HELPER stream repeating %l"><custom-block s="%l followed by %s"><block s="reportCDR"><block var="items"/></block><block s="reportListItem"><l>1</l><block var="items"/></block></custom-block></custom-block></custom-block></block></script></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; in stream %&apos;stream&apos; %&apos;action&apos;" type="command" category="Streams" helper="true"><comment x="0" y="0" w="238" collapsed="false">The stream equivalant of FOR EACH (item) OF (list).&#xD;&#xD;CAUTION&#xD;If the embedded action uses a variable that is external to this block, the variable can not be changed inside the action.&#xD;&#xD;General info on streams: see the help text of TAIL OF STREAMS.</comment><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><custom-block s="let %upvar $arrowLeft %s"><l>action*</l><custom-block s="substitute vars %s"><block var="action"/></custom-block></custom-block><block s="doSetVar"><l>#</l><l>1</l></block><block s="doUntil"><custom-block s="is stream %l empty?"><block var="stream"/></custom-block><script><block s="doSetVar"><l>item</l><custom-block s="head of stream %l"><block var="stream"/></custom-block></block><block s="doRun"><block s="reportAttributeOf"><block var="action*"/><block s="reportEnvironment"><l><option>script</option></l></block></block><list></list></block><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>stream</l><custom-block s="tail of stream %l"><block var="stream"/></custom-block></block></script></block></script><scripts><script x="10" y="262.1666666666666"><custom-block s="%upvar for each %upvar in stream %l %cs"><l>#</l><l>item</l><custom-block s="stream %mult%s"><block s="reportNumbers"><l>11</l><l>20</l></block></custom-block><script><block s="doSayFor"><block s="reportNewList"><list><block var="#"/><block var="item"/></list></block><l>0.5</l></block></script></custom-block></script></scripts></block-definition><block-definition s="sorted stream from unsorted list %&apos;data&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="285.4601562500002" collapsed="false">A stream of sorted items (in ascending order) from an unsorted list. So item 1 of the stream is the list’s smallest item. If you are only looking for a few of a list’s smallest items, but don’t know how many in advance, this approach makes sense.&#xD;&#xD;For practical purposes, [SORTED] OF is usually faster, though. This is because the latter block’s JavaScript code was very much optimized for runtime efficiency - it ain’t fair, really.</comment><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"><custom-block s="the empty stream"></custom-block></block></script><list></list></block><custom-block s="let %upvar $arrowLeft %s"><l>lowest</l><block s="reportVariadicMin"><block var="data"/></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>low index</l><block s="reportListIndex"><block var="lowest"/><block var="data"/></block></custom-block><custom-block s="let %upvar $arrowLeft %s"><l>length</l><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></custom-block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block var="lowest"/><custom-block s="sorted stream from unsorted list %l"><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportModulus"><block s="reportNumbers"><block var="low index"/><block s="reportDifference"><block s="reportVariadicSum"><list><block var="low index"/><block var="length"/></list></block><l>2</l></block></block><block var="length"/></block><l>1</l></list></block><block var="data"/></block></custom-block></custom-block></block></script><scripts><script x="10" y="355.74999999999994"><custom-block s="$speechBubble %mlt"><l>Demo: only the top-3 of lowest numbers from a large list is calculated</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>3</l><custom-block s="sorted stream from unsorted list %l"><block s="reportListAttribute"><l><option>shuffled</option></l><block s="reportNumbers"><l>1</l><l>123456</l></block></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="$speechBubble %&apos;text&apos; %&apos;action&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%mlt">no comment!</input><input type="%cs" initial="1"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block></script></block-definition><block-definition s="$gears HELPER interleave streams %&apos;delayed streams&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="2"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="delayed streams"/></block></block><script><block s="doReport"><block s="reportIfElse"><block s="reportListIsEmpty"><block var="delayed streams"/></block><custom-block s="the empty stream"></custom-block><block s="evaluate"><block s="reportListItem"><l>1</l><block var="delayed streams"/></block><list></list></block></block></block></script><list></list></block><block s="doIf"><custom-block s="is stream %l empty?"><custom-block s="%upvar $arrowLeft %s"><l>first</l><block s="evaluate"><block s="reportListItem"><l>1</l><block var="delayed streams"/></block><list></list></block></custom-block></custom-block><script><block s="doReport"><custom-block s="$gears HELPER interleave streams %l"><block s="reportCDR"><block var="delayed streams"/></block></custom-block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="first"/></custom-block><custom-block s="$gears HELPER interleave streams %l"><custom-block s="%l followed by %s"><block s="reportCDR"><block var="delayed streams"/></block><custom-block s="delay %s %n"><custom-block s="tail of stream %l"><block var="first"/></custom-block><l></l></custom-block></custom-block></custom-block></custom-block></block></script></block-definition><block-definition s="interleave streams %&apos;a&apos; %&apos;b&apos;" type="reporter" category="Streams" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%anyUE" initial="1"></input></inputs><script><block s="doIf"><custom-block s="is stream %l empty?"><block var="a"/></custom-block><script><block s="doReport"><block s="evaluate"><block var="b"/><list></list></block></block></script><list></list></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="a"/></custom-block><custom-block s="interleave streams %l %anyUE"><block s="evaluate"><block var="b"/><list></list></block><custom-block s="tail of stream %l"><block var="a"/></custom-block></custom-block></custom-block></block></script></block-definition><block-definition s="keep items from stream %&apos;a&apos; $nl %&apos;logical operator&apos; stream %&apos;b&apos; $nl ordered by key %&apos;key function&apos;" type="reporter" category="Streams" helper="true"><comment x="0" y="0" w="227.85714285714286" collapsed="false">Merge two streams, keeping only items satisfying a logical condition with respect to the items of a second stream.&#xD;&#xD;INPUT&#xD;1. primary stream;&#xD;2. logical operator (AND, OR, XOR, NOT);&#xD;3. secondary stream;&#xD;4. key function, by which both streams are supposed to have been pre-sorted (ascending).&#xD;&#xD;WHAT IT DOES (with each logical operator)&#xD;AND: items from the primary stream that are also in the secondary stream will be kept (in case of multiple copies in either stream: the output stream will contain as many copies as the minimum number of copies of both input streams);&#xD;OR: items that are either in the primary or secondary stream, or both, will be kept. &#xD;In case of multiple copies of an item: like AND.&#xD;XOR: like OR, but items that are in both streams will be excluded.&#xD;NOT: items are kept that are in the primary stream and not in the secondary stream.</comment><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%s" readonly="true" initial="1">AND<options>AND&#xD;OR&#xD;XOR&#xD;but NOT</options></input><input type="%l" initial="1"></input><input type="%repRing" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="logical operator"/><l>AND</l></list></block><script><block s="doReport"><custom-block s="keep items from stream %l %br AND stream %l %br ordered by key %repRing"><block var="a"/><block var="b"/><block var="key function"/></custom-block></block></script><list><block s="reportVariadicEquals"><list><block var="logical operator"/><l>OR</l></list></block><script><block s="doReport"><custom-block s="keep items from stream %l %br OR stream %l %br ordered by key %repRing"><block var="a"/><block var="b"/><block var="key function"/></custom-block></block></script><block s="reportVariadicEquals"><list><block var="logical operator"/><l>XOR</l></list></block><script><block s="doReport"><custom-block s="keep items from stream %l %br XOR stream %l %br ordered by key %repRing"><block var="a"/><block var="b"/><block var="key function"/></custom-block></block></script></list></block><block s="doReport"><custom-block s="keep items from stream %l %br but NOT stream %l %br ordered by key %repRing"><block var="a"/><block var="b"/><block var="key function"/></custom-block></block></script><scripts><script x="7.142857142857143" y="388.83333333333366"><custom-block s="$speechBubble %mlt"><l>Demo</l></custom-block><block s="doReport"><custom-block s="list %n items of stream %l"><l>10</l><custom-block s="keep items from stream %l %br %s stream %l %br ordered by key %repRing"><custom-block s="stream with numbers from %n"><l>1</l></custom-block><l>XOR</l><custom-block s="generate stream %repRing %upvar w/seeds: %mult%s"><block s="reifyReporter"><autolambda><block s="reportVariadicProduct"><list><block var="#"/><l>2.5</l></list></block></autolambda><list></list></block><l>#</l><list></list></custom-block><block s="reifyReporter"><script></script><list></list></block></custom-block></custom-block></block></script></scripts></block-definition><block-definition s="%&apos;value&apos; following %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="187.00000000000003" collapsed="false">The counterpart of IN FRONT OF: returns the first input attached at the back end of the list that is the second input</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="data"/><block s="reportNewList"><list><block var="value"/></list></block></list></block></block></script></block-definition><block-definition s="square %&apos;number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1"></input></inputs><script><block s="doReport"><block s="reportVariadicProduct"><list><block var="number"/><block var="number"/></list></block></block></script></block-definition><block-definition s="listify %&apos;jsonString&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:os dados JSON _ em formato de lista&#xD;</translations><inputs><input type="%mlt"></input></inputs><script><block s="doReport"><block s="reportTextSplit"><block var="jsonString"/><l><option>json</option></l></block></block></script></block-definition><block-definition s="value at key %&apos;key&apos; of %&apos;lst&apos;" type="reporter" category="operators" helper="true"><header></header><code></code><translations>pt:o valor com chave _ em _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>each item</l><block var="lst"/><script><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="each item"/></block><block var="key"/></list></block><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="each item"/></block></block></script><list></list></block></script></block></script></block><block s="doReport"><l></l></block></script></block-definition><block-definition s="%&apos;method&apos; url: %&apos;url&apos; send: %&apos;payload&apos; headers: %&apos;headers&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:a resposta a _ de _ enviando _ e cabeçalhos _&#xD;</translations><inputs><input type="%s" readonly="true">GET<options>GET&#xD;POST&#xD;PUT&#xD;DELETE</options></input><input type="%s">https://snap.berkeley.edu</input><input type="%s"></input><input type="%mult%l" readonly="true"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>xhr_request(mth, url, dta, hdrs)</l><list><block var="method"/><block var="url"/><block var="payload"/><block var="headers"/></list></block></block></script></block-definition><block-definition s="key: %&apos;key&apos; value: %&apos;value&apos;" type="reporter" category="operators" helper="true"><header></header><code></code><translations>pt:um par (chave: _ , valor: _ )&#xD;</translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="key"/><block var="value"/></list></block></block></script></block-definition><block-definition s="current location" type="reporter" category="sensing"><comment x="0" y="0" w="200" collapsed="false">Reports a three-item list containing the latitude and longitude of the user, and the precision of the measurements.  Works only if the user allows snap.berkeley.edu access to location data.  Some browsers also require an HTTPS connection to Snap!.</comment><header></header><code></code><translations>pt:a localização actual do dispositivo&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>callback</l></list></block><block s="doSetVar"><l>callback</l><block s="reportApplyExtension"><l>geo_location(acc?)</l><list><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></block><block s="doWaitUntil"><block s="reportVariadicEquals"><list><block s="reportListAttribute"><l><option>length</option></l><block s="evaluate"><block var="callback"/><list></list></block></block><l>3</l></list></block></block><block s="doReport"><block s="evaluate"><block var="callback"/><list></list></block></block></script></block-definition><block-definition s="binary data from %&apos;url&apos; type %&apos;idl&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s" readonly="true" initial="1">octet<options>byte&#xD;octet&#xD;short&#xD;unsigned short&#xD;long&#xD;unsigned long&#xD;unrestricted float&#xD;unrestricted double&#xD;bigint</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>xhr_binary(url, webIDL_type)</l><list><block var="url"/><block var="idl"/></list></block></block></script></block-definition><block-definition s="let %&apos;declarations&apos;" type="command" category="other"><header></header><code></code><translations>de:deklariere _&#xD;</translations><inputs><input type="%group%upvar%s" irreplaceable="true" expand="$nl&#xD;$arrowLeft" initial="2" min="2">$_variable&#xD;$_thing</input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>tuple</l><block var="declarations"/><script><block s="doTellTo"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyScript"><script><block s="doSetVar"><l></l><l></l></block></script><list></list></block><block var="tuple"/></block></script></block></script></block></script></block-definition><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;pl:utwórz zmienną _ _&#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;pl:usuń zmienną _&#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;pl:ustaw zmienną _ na _&#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;pl:zmienna _&#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;pl:zmienna _ istnieje?&#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;pl:pokaż zmienną _&#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;pl:ukryj zmienną _&#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="bitwise not %&apos;a&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_not(a)</l><list><block var="a"/></list></block></block></script></block-definition><block-definition s="bitwise %&apos;a&apos; and %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_and(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="bitwise %&apos;a&apos; or %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_or(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="bitwise %&apos;a&apos; xor %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_xor(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="bitwise left shift %&apos;a&apos; by %&apos;b&apos; bits" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_left_shift(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="bitwise right shift %&apos;a&apos; by %&apos;b&apos; bits" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_right_shift(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="bitwise unsigned right shift %&apos;a&apos; by %&apos;b&apos; bits" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>bit_unsigned_right_shift(a, b)</l><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="write %&apos;text&apos; size %&apos;sz&apos; stats %&apos;stats&apos;" type="command" category="pen"><comment x="0" y="0" w="211.66666666666669" collapsed="false">Writes text onto the stage, and allows extra styling. You don&apos;t have to add stats.&#xD;&#xD;Created by Tethrarxitet!&#xD;pic goes hard feel free to screenshot</comment><header></header><code></code><translations>es:escribir _ con tamaña _ e información _&#xD;pt:escreva _ com tamanho _ e edita _&#xD;fr:écrire _ avec la taille _ et les modificateurs _&#xD;ru:напишите _ с размером _ и модами _&#xD;</translations><inputs><input type="%s">Hello!</input><input type="%n">12</input><input type="%n" readonly="true"></input></inputs><script><block s="write"><block var="text"/><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="stats"/><l>0</l></list></block><block var="sz"/><block s="reportJoinWords"><list><block s="reportIfElse"><block s="reportVariadicEquals"><list><block s="reportTypeOf"><block s="reportListItem"><l>2</l><block var="stats"/></block></block><l>Boolean</l></list></block><block s="reportIfElse"><block s="reportListItem"><l>2</l><block var="stats"/></block><l>bold </l><l></l></block><block s="reportJoinWords"><list><block s="reportListItem"><l>2</l><block var="stats"/></block><l> </l></list></block></block><block s="reportIfElse"><block s="reportListItem"><l>3</l><block var="stats"/></block><l>italic </l><l></l></block><block var="sz"/><l>px </l><block s="reportListItem"><l>1</l><block var="stats"/></block><l>,</l></list></block></block></block></script><scripts><script x="8.333333333333334" y="241.05555555555455"><custom-block s="write %s size %n stats %n"><l>Hello!</l><l>12</l><l></l></custom-block></script><script x="8.333333333333334" y="278.38888888888783"><custom-block s="text costume %s size %n stats %n"><l>Hello!</l><l>12</l><l></l></custom-block></script><script x="8.333333333333334" y="309.7222222222213"><custom-block s="font %s %br bold %b %br italic %b"><l>monospace</l><l/><l/></custom-block></script><script x="8.333333333333334" y="364.222222222221"><custom-block s="font %s %br weight %n %br italic %b"><l>monospace</l><l>500</l><l/></custom-block></script><comment x="249.9980468749998" y="253.0833333333322" w="90" collapsed="false">Dependencies and blocks that depend on this</comment></scripts></block-definition><block-definition s="text costume %&apos;text&apos; size %&apos;size&apos; stats %&apos;stats&apos;" type="reporter" category="pen"><header></header><code></code><translations>es:disfraz de texto _ tamaño _ e información _&#xD;pt:traje de texto _ com tamanho _ e edita _&#xD;fr:costume de texte _ avec taille _ et modificateurs _&#xD;ru:текст костюм _ с размером _ и модами _&#xD;</translations><inputs><input type="%s">Hello!</input><input type="%n">12</input><input type="%n" readonly="true"></input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>x</l><l>y</l><l>dir</l><l>cst</l><l>trails</l><l>pen state</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>cst</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="setHeading"><l>90</l></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><custom-block s="write %s size %n stats %n"><block var="text"/><block var="size"/><block var="stats"/></custom-block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="doSetVar"><l>costume</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="costume"/><block s="reportJoinWords"><list><block var="text"/></list></block></list></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="doIf"><block var="pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="costume"/></block></script></block-definition><block-definition s="font %&apos;font&apos; $nl bold %&apos;it&apos; $nl italic %&apos;bd&apos;" type="reporter" category="pen"><comment x="0" y="0" w="173.33333333333334" collapsed="false">Creates a list of stats for the new write block to use.&#xD;&#xD;Created by Tethrarxitet!&#xD;tamale</comment><header></header><code></code><translations>pt:nome da fonte _ _ texto em negrito? _ _ oblíquo? _&#xD;es:nombre de fuente _ _ ¿negrita? _ _ ¿oblicuo? _&#xD;fr:nom de la police _ _ police en gras ? _ _ oblique ? _&#xD;ru:шриф _ _ жирный? _ _ курсив? _&#xD;</translations><inputs><input type="%s">monospace</input><input type="%b"></input><input type="%b"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="font"/><block var="it"/><block var="bd"/></list></block></block></script></block-definition><block-definition s="font %&apos;font&apos; $nl weight %&apos;it&apos; $nl italic %&apos;bd&apos;" type="reporter" category="pen"><comment x="0" y="0" w="173.33333333333334" collapsed="false">Creates a list of stats for the new write block to use.&#xD;&#xD;Created by Tethrarxitet!&#xD;tamale</comment><header></header><code></code><translations>es:nombre de la fuente _ _ espesor _ _ ¿oblicuo? _&#xD;pt:nome da fonte _ _ grossura _ _ oblíquo? _&#xD;fr:nom de la police _ _ épaisseur _ _ oblique ? _&#xD;ru:шриф _ _ жирность _ _ курсив? _&#xD;</translations><inputs><input type="%s">monospace</input><input type="%n">500</input><input type="%b"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="font"/><block var="it"/><block var="bd"/></list></block></block></script></block-definition><block-definition s="run api: %&apos;receiver&apos; . %&apos;method&apos; ( %&apos;inputs&apos; )" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1"><options>§_objectsMenu</options></input><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_dynamicMenu</options></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>block</l></list></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="method"/></list></block></autolambda><list></list></block><custom-block s="%s methods of %s"><l>command</l><block var="receiver"/></custom-block></block></block><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>script</option></l></block><script><block s="doTellTo"><block var="receiver"/><block var="block"/><block var="inputs"/></block></script><list></list></block></script><scripts><script x="10" y="240.24999999999994"><block s="receiveSlotEvent"><l>method</l><l><option>menu</option></l></block><block s="doReport"><block s="reportBlockAttribute"><l><option>label</option></l><custom-block s="%s methods of %s"><l>command</l><block var="receiver"/></custom-block></block></block></script><script x="10" y="322.24999999999994"><block s="receiveSlotEvent"><l>receiver</l><l><option>edited</option></l></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportBlockAttribute"><l><option>label</option></l><custom-block s="%s methods of %s"><l>command</l><block var="receiver"/></custom-block></block><block var="method"/></block></block><script><block s="doSetSlot"><l>method</l><l></l></block></script><list></list></block></script><script x="10" y="471.6666666666667"><block s="receiveSlotEvent"><l>method</l><l><option>edited</option></l></block><block s="doDeclareVariables"><list><l>block</l></list></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="method"/></list></block></autolambda><list></list></block><custom-block s="%s methods of %s"><l>command</l><block var="receiver"/></custom-block></block></block><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>script</option></l></block><script><block s="doSetSlot"><l>inputs</l><block s="reportReshape"><block var="inputs"/><list><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block s="reportTextSplit"><block var="block"/><l><option>blocks</option></l></block></block><l>1</l></block></list></block></block></script><list></list></block></script></scripts></block-definition><block-definition s="call api: %&apos;receiver&apos; . %&apos;method&apos; ( %&apos;inputs&apos; )" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1"><options>§_objectsMenu</options></input><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_dynamicMenu</options></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>block</l></list></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="method"/></list></block></autolambda><list></list></block><custom-block s="%s methods of %s"><l>reporter</l><block var="receiver"/></custom-block></block></block><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>script</option></l></block><script><block s="doTellTo"><block var="receiver"/><block var="block"/><block var="inputs"/></block></script><list></list></block></script><scripts><script x="10" y="234.24999999999994"><block s="receiveSlotEvent"><l>method</l><l><option>menu</option></l></block><block s="doReport"><block s="reportBlockAttribute"><l><option>label</option></l><custom-block s="%s methods of %s"><l>reporter</l><block var="receiver"/></custom-block></block></block></script><script x="10" y="316.24999999999994"><block s="receiveSlotEvent"><l>receiver</l><l><option>edited</option></l></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportBlockAttribute"><l><option>label</option></l><custom-block s="%s methods of %s"><l>reporter</l><block var="receiver"/></custom-block></block><block var="method"/></block></block><script><block s="doSetSlot"><l>method</l><l></l></block></script><list></list></block></script><script x="10" y="465.6666666666667"><block s="receiveSlotEvent"><l>method</l><l><option>edited</option></l></block><block s="doDeclareVariables"><list><l>block</l></list></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="method"/></list></block></autolambda><list></list></block><custom-block s="%s methods of %s"><l>reporter</l><block var="receiver"/></custom-block></block></block><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>script</option></l></block><script><block s="doSetSlot"><l>inputs</l><block s="reportReshape"><block var="inputs"/><list><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block s="reportTextSplit"><block var="block"/><l><option>blocks</option></l></block></block><l>1</l></block></list></block></block></script><list></list></block></script></scripts></block-definition><block-definition s="%&apos;type&apos; methods of %&apos;sprite&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">command<options>command&#xD;reporter</options></input><input type="%s" readonly="true" initial="1">$_myself<options>§_objectsMenuWithSelf</options></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportIsA"><block s="reportObject"><block var="sprite"/></block><l><option>agent</option></l></block><block s="reportAskFor"><block var="sprite"/><block s="reifyReporter"><autolambda><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportVariadicAnd"><list><block s="reportNot"><block s="reportBlockAttribute"><l><option>global?</option></l><block s="reifyReporter"><script></script><list></list></block></block></block><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>type</option></l><block s="reifyReporter"><script></script><list></list></block></block><block s="reportListIndex"><block var="type"/><block s="reportNewList"><list><l>command</l><l>reporter</l></list></block></block></list></block><block s="reportVariadicNotEquals"><list><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block s="reportBlockAttribute"><l><option>comment</option></l><block s="reifyReporter"><script></script><list></list></block></block><l><option>word</option></l></block></block><l>private</l></list></block></list></block></autolambda><list></list></block><block s="reportGet"><l><option>blocks</option></l></block></block></autolambda><list></list></block><list></list></block><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="scriptify %&apos;template&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%repRing" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>def</l></list></block><block s="doSetVar"><l>def</l><block s="reportBlockAttribute"><l><option>definition</option></l><block var="template"/></block></block><block s="doReport"><block s="reportJoinWords"><block s="reportCONS"><block s="reportNewList"><list><block s="reportJoinWords"><list><block s="reifyScript"><script><block s="doDefineBlock"><l>a</l><l></l><block s="reifyReporter"><script></script><list></list></block></block></script><list></list></block><l>block</l><block s="reportBlockAttribute"><l><option>label</option></l><block var="template"/></block><block s="reportJoinWords"><list><block s="reifyReporter"><autolambda><block s="reifyReporter"><script></script><list></list></block></autolambda><list></list></block><block var="def"/><block s="reportCONS"><block s="reportListAttribute"><l><option>length</option></l><block s="reportAttributeOf"><l><option>input names</option></l><block var="def"/></block></block><block s="reportAttributeOf"><l><option>input names</option></l><block var="def"/></block></block></list></block></list></block></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><block s="reportJoinWords"><list><block s="reifyScript"><script><block s="doSetBlockAttribute"><l></l><block s="reifyReporter"><script></script><list></list></block><l></l></block></script><list></list></block><l></l><block s="reifyReporter"><autolambda><block var="block"/></autolambda><list></list></block><custom-block s="blockify %l"><block s="reportBlockAttribute"><l></l><block var="template"/></block></custom-block></list></block></list></block></autolambda><list></list></block><block s="reportCDR"><block s="reportCDR"><block s="reportApplyExtension"><l>snap_block_selectors</l><list></list></block></block></block></block></block></block></block></script></block-definition><block-definition s="callers of %&apos;block&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportVariadicAnd"><list><block s="reportBlockAttribute"><l><option>custom?</option></l><block s="reifyReporter"><script></script><list></list></block></block><block s="reportListContainsItem"><block s="reportListAttribute"><l><option>flatten</option></l><block s="reportTextSplit"><block s="reportBlockAttribute"><l><option>definition</option></l><block s="reifyReporter"><script></script><list></list></block></block><l><option>blocks</option></l></block></block><block var="block"/></block></list></block></autolambda><list></list></block><block s="reportGet"><l><option>blocks</option></l></block></block></block></script></block-definition><block-definition s="inject %&apos;cmd&apos; $nl into %&apos;script&apos; $nl %&apos;position&apos; each %&apos;test&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%cs" initial="1"></input><input type="%cs" initial="1"></input><input type="%s" readonly="true" irreplaceable="true" initial="1">after<options>before&#xD;after</options></input><input type="%predRing" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>syntax</l><l>i</l><l>expr</l></list></block><block s="doSetVar"><l>syntax</l><block s="reportTextSplit"><block var="script"/><l><option>blocks</option></l></block></block><block s="doIf"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="syntax"/></block><l><option>script</option></l></block><script><block s="doSetVar"><l>syntax</l><block s="reportNewList"><list><block var="syntax"/></list></block></block></script><list></list></block><block s="doWarp"><script><block s="doUntil"><block s="reportVariadicEquals"><list><block var="i"/><block s="reportListAttribute"><l><option>length</option></l><block var="syntax"/></block></list></block><script><block s="doChangeVar"><l>i</l><l>1</l></block><block s="doSetVar"><l>expr</l><block s="reportListItem"><block var="i"/><block var="syntax"/></block></block><block s="doFor"><l>k</l><l>2</l><block s="reportListAttribute"><l><option>length</option></l><block var="expr"/></block><script><block s="doIf"><block s="reportIsA"><block s="reportListItem"><block var="k"/><block var="expr"/></block><l><option>list</option></l></block><script><block s="doReplaceInList"><block var="k"/><block var="expr"/><block s="reportTextSplit"><block s="evaluate"><block s="reifyReporter"><autolambda><custom-block s="inject %cs %br into %cs %br %s each %predRing"><block var="cmd"/><block s="reportJoinWords"><block s="reportListItem"><block var="k"/><block var="expr"/></block></block><l></l><block var="test"/></custom-block></autolambda><list></list></block><list><block var="position"/></list></block><l><option>blocks</option></l></block></block></script><list></list></block></script></block><block s="doIf"><block s="reportIfElse"><block s="reportIsA"><block var="test"/><l><option>command</option></l></block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="expr"/></block><block var="test"/></list></block><block s="evaluate"><block var="test"/><list><block s="reportListItem"><l>1</l><block var="expr"/></block></list></block></block><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="position"/><l>after</l></list></block><script><block s="doChangeVar"><l>i</l><l>1</l></block></script><list></list></block><block s="doInsertInList"><block s="reportTextSplit"><block var="cmd"/><l><option>blocks</option></l></block><block var="i"/><block var="syntax"/></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="position"/><l>before</l></list></block><script><block s="doChangeVar"><l>i</l><l>1</l></block></script><list></list></block></script><list></list></block></script></block></script></block><block s="doReport"><block s="reportAttributeOf"><block s="reportJoinWords"><block var="syntax"/></block><block s="reportEnvironment"><l><option>caller</option></l></block></block></block></script></block-definition><block-definition s="call stack" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>current</l><l>stack</l></list></block><block s="doSetVar"><l>stack</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>current</l><block s="reportEnvironment"><l><option>script</option></l></block></block><block s="doWarp"><script><block s="doUntil"><block s="reportIsA"><block var="current"/><l><option>agent</option></l></block><script><block s="doAddToList"><block var="current"/><block var="stack"/></block><block s="doSetVar"><l>current</l><block s="reportAttributeOf"><block s="reifyReporter"><autolambda><block s="reportEnvironment"><l><option>caller</option></l></block></autolambda><list></list></block><block var="current"/></block></block></script></block></script></block><block s="doAddToList"><block var="current"/><block var="stack"/></block><block s="doReport"><block var="stack"/></block></script></block-definition><block-definition s="get %&apos;variable name&apos; of caller" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportAttributeOf"><block var="variable name"/><block s="reportAttributeOf"><block s="reifyReporter"><autolambda><block s="reportEnvironment"><l><option>caller</option></l></block></autolambda><list></list></block><block s="reportEnvironment"><l><option>caller</option></l></block></block></block></block></script></block-definition><block-definition s="set %&apos;variable name&apos; of caller to %&apos;value&apos;" type="command" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block s="reifyScript"><script><block s="doSetVar"><l></l><l></l></block></script><list></list></block><block s="reportAttributeOf"><block s="reifyReporter"><autolambda><block s="reportEnvironment"><l><option>caller</option></l></block></autolambda><list></list></block><block s="reportEnvironment"><l><option>caller</option></l></block></block></block><list><block var="variable name"/><block var="value"/></list></block></script></block-definition><block-definition s="expand %&apos;slot&apos; to %&apos;level&apos; slots" type="command" category="control"><header></header><code></code><translations>de:dehne _ auf _ Eingabefelder aus&#xD;</translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_inputSlotsMenu</options></input><input type="%n" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>block</l><l>inputs</l><l>defaults</l></list></block><block s="doSetVar"><l>block</l><block s="reportAttributeOf"><block s="reifyReporter"><autolambda><block s="reportEnvironment"><l><option>caller</option></l></block></autolambda><list></list></block><block s="reportEnvironment"><l><option>caller</option></l></block></block></block><block s="doSetVar"><l>inputs</l><block s="reportAttributeOf"><block var="slot"/><block s="reportEnvironment"><l><option>caller</option></l></block></block></block><block s="doIf"><block s="reportVariadicGreaterThan"><list><block var="level"/><block s="reportListAttribute"><l><option>length</option></l><block var="inputs"/></block></list></block><script><block s="doSetVar"><l>defaults</l><block s="reportReshape"><block s="reportListItem"><block s="reportListIndex"><block var="slot"/><block s="reportAttributeOf"><l><option>input names</option></l><block s="reportBlockAttribute"><l><option>definition</option></l><block var="block"/></block></block></block><block s="reportBlockAttribute"><l><option>defaults</option></l><block var="block"/></block></block><list><block var="level"/></list></block></block><block s="doWarp"><script><block s="doFor"><l>i</l><block s="reportVariadicSum"><list><block s="reportListAttribute"><l><option>length</option></l><block var="inputs"/></block><l>1</l></list></block><block var="level"/><script><block s="doAddToList"><block s="reportListItem"><block var="i"/><block var="defaults"/></block><block var="inputs"/></block></script></block></script></block></script><list></list></block><block s="doTellTo"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyScript"><script><block s="doSetSlot"><l></l><l></l></block></script><list></list></block><list><block var="slot"/><block s="reportIfElse"><block s="reportVariadicLessThan"><list><block var="level"/><l>1</l></list></block><block s="reportNewList"><list></list></block><block s="reportReshape"><block var="inputs"/><list><block var="level"/></list></block></block></list></block></script></block-definition><block-definition s="inform title %&apos;title&apos; message %&apos;message&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%txt">Alert</input><input type="%mlt">Hello there!</input></inputs><script><custom-block s="load dialog extension"></custom-block><block s="doApplyExtension"><l>dlg_inform(title,message)</l><list><block var="title"/><block var="message"/></list></block></script></block-definition><block-definition s="load dialog extension" type="command" category="looks" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/dialogs.js</l></list></block></script></block-definition><block-definition s="show message %&apos;message&apos; secs %&apos;secs&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">2</input></inputs><script><custom-block s="load dialog extension"></custom-block><block s="doApplyExtension"><l>dlg_show_message(message,secs)</l><list><block var="message"/><block var="secs"/></list></block></script></block-definition><block-definition s="load fancy text morphs extension" type="command" category="looks" helper="true"><comment x="0" y="0" w="90" collapsed="false">All blocks call this internally. You can optionally load it manually call it up front to speed up the first use.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/fancy-text-morphs.js</l></list></block></script></block-definition><block-definition s="fancy think %&apos;data&apos; size: %&apos;size&apos; max width: %&apos;maxWidth&apos; color: %&apos;color&apos; in my %&apos;anchor&apos; for %&apos;n&apos; seconds" type="command" category="looks"><comment x="0" y="0" w="90" collapsed="false">Syntax:&#xD;_italics_&#xD;*bold*&#xD;Fraction:&#xD;&#126;(1/2)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">14</input><input type="%n">130<options>default=130&#xD;auto</options></input><input type="%txt">rgb(0,0,0)</input><input type="%s" readonly="true">top right<options>top right&#xD;top left&#xD;bottom right&#xD;bottom left</options></input><input type="%n">2</input></inputs><script><custom-block s="fancy think %mlt size: %n max width: %n color: %txt in my %s"><block var="data"/><block var="size"/><block var="maxWidth"/><block var="color"/><block var="anchor"/></custom-block><block s="doWait"><block var="n"/></block><block s="bubble"><l></l></block></script></block-definition><block-definition s="fancy think %&apos;data&apos; size: %&apos;size&apos; max width: %&apos;maxWidth&apos; color: %&apos;color&apos; in my %&apos;anchor&apos;" type="command" category="looks"><comment x="0" y="0" w="90" collapsed="false">Syntax:&#xD;_italics_&#xD;*bold*&#xD;Fraction:&#xD;&#126;(1/2)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">14</input><input type="%n">130<options>default=130&#xD;auto</options></input><input type="%txt">rgb(0,0,0)</input><input type="%s" readonly="true">top right<options>top right&#xD;top left&#xD;bottom right&#xD;bottom left</options></input></inputs><script><custom-block s="load fancy text morphs extension"></custom-block><block s="doApplyExtension"><l>ftx_think(data, size, maxWidth, color, anchor)</l><list><block var="data"/><block var="size"/><block var="maxWidth"/><block var="color"/><block var="anchor"/></list></block></script></block-definition><block-definition s="fancy say %&apos;data&apos; size: %&apos;size&apos; max width: %&apos;maxWidth&apos; color: %&apos;color&apos; in my %&apos;anchor&apos; for %&apos;n&apos; seconds" type="command" category="looks"><comment x="0" y="0" w="90" collapsed="false">Syntax:&#xD;_italics_&#xD;*bold*&#xD;Fraction:&#xD;&#126;(1/2)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">14</input><input type="%n">130<options>default=130&#xD;auto</options></input><input type="%txt">rgb(0,0,0)</input><input type="%s" readonly="true">top right<options>top right&#xD;top left&#xD;bottom right&#xD;bottom left</options></input><input type="%n">2</input></inputs><script><custom-block s="fancy say %mlt size: %n max width: %n color: %txt in my %s"><block var="data"/><block var="size"/><block var="maxWidth"/><block var="color"/><block var="anchor"/></custom-block><block s="doWait"><block var="n"/></block><block s="bubble"><l></l></block></script></block-definition><block-definition s="fancy say %&apos;data&apos; size: %&apos;size&apos; max width: %&apos;maxWidth&apos; color: %&apos;color&apos; in my %&apos;anchor&apos;" type="command" category="looks"><comment x="0" y="0" w="90" collapsed="false">Syntax:&#xD;_italics_&#xD;*bold*&#xD;Fraction:&#xD;&#126;(1/2)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">14</input><input type="%n">130<options>default=130&#xD;auto</options></input><input type="%txt">rgb(0,0,0)</input><input type="%s" readonly="true">top right<options>top right&#xD;top left&#xD;bottom right&#xD;bottom left</options></input></inputs><script><custom-block s="load fancy text morphs extension"></custom-block><block s="doApplyExtension"><l>ftx_say(data, size, maxWidth, color, anchor)</l><list><block var="data"/><block var="size"/><block var="maxWidth"/><block var="color"/><block var="anchor"/></list></block></script></block-definition><block-definition s="fancy text costume %&apos;data&apos; size: %&apos;size&apos; max width: %&apos;maxWidth&apos; color: %&apos;color&apos; align: %&apos;align&apos; font: %&apos;font&apos;" type="reporter" category="looks"><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">14</input><input type="%n">0<options>auto</options></input><input type="%txt">rgb(0,0,0)</input><input type="%txt" readonly="true">left<options>left&#xD;center&#xD;right</options></input><input type="%txt">sans-serif<options>serif&#xD;sans-serif&#xD;monospace&#xD;Arial&#xD;Arial Black&#xD;Verdana&#xD;Tahoma&#xD;Trebuchet MS&#xD;Impact&#xD;Times New Roman&#xD;Didot&#xD;Georgia&#xD;American Typewriter&#xD;Andalé Mono&#xD;Courier&#xD;Lucida Console&#xD;Monaco&#xD;Bradley Hand&#xD;Brush Script MT&#xD;Luminari&#xD;Comic Sans MS</options></input></inputs><script><custom-block s="load fancy text morphs extension"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>ftx_costume(data, size, maxWidth, color, align, font)</l><list><block var="data"/><block var="size"/><block var="maxWidth"/><block var="color"/><block var="align"/><block var="font"/></list></block></block></script></block-definition><block-definition s="remove formatting characters from %&apos;string&apos;" type="reporter" category="operators" helper="true"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><custom-block s="load fancy text morphs extension"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>ftx_remove_formatting_characters(text)</l><list><block var="string"/></list></block></block></script></block-definition><block-definition s="write on stage text %&apos;text&apos; size: %&apos;size&apos; font: %&apos;font&apos; align: %&apos;align&apos; x: %&apos;x&apos; y: %&apos;y&apos; color: %&apos;color&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">Syntax:&#xD;_italics_&#xD;*bold*&#xD;Fraction:&#xD;&#126;(1/2)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">12</input><input type="%txt">Arial<options>serif&#xD;sans-serif&#xD;monospace&#xD;Arial&#xD;Arial Black&#xD;Verdana&#xD;Tahoma&#xD;Trebuchet MS&#xD;Impact&#xD;Times New Roman&#xD;Didot&#xD;Georgia&#xD;American Typewriter&#xD;Andalé Mono&#xD;Courier&#xD;Lucida Console&#xD;Monaco&#xD;Bradley Hand&#xD;Brush Script MT&#xD;Luminari&#xD;Comic Sans MS</options></input><input type="%txt" readonly="true">left<options>left&#xD;center&#xD;right</options></input><input type="%n">0</input><input type="%n">0</input><input type="%txt">rgb(0,0,0)</input></inputs><script><custom-block s="do %cs and restore pen"><script><block s="doDeclareVariables"><list><l>text dimensions</l></list></block><block s="doSetVar"><l>text dimensions</l><custom-block s="dimensions of text %mlt size: %n font: %txt align: %txt x: %n y: %n"><block var="text"/><block var="size"/><block var="font"/><block var="align"/><block var="x"/><block var="y"/></custom-block></block><block s="up"></block><block s="gotoXY"><custom-block s="value at key %s of %l"><l>x</l><block var="text dimensions"/></custom-block><custom-block s="value at key %s of %l"><l>y</l><block var="text dimensions"/></custom-block></block><custom-block s="write on stage %mlt size: %n font: %txt color: %txt"><block var="text"/><block var="size"/><block var="font"/><block var="color"/></custom-block></script></custom-block></script></block-definition><block-definition s="dimensions of text %&apos;text&apos; size: %&apos;size&apos; font: %&apos;font&apos; align: %&apos;align&apos; x: %&apos;x&apos; y: %&apos;y&apos;" type="reporter" category="pen" helper="true"><comment x="0" y="0" w="90" collapsed="false">pre-render text transparent to determine height and width and, if necessary, the adjusted coordinates (for right and center alignment)</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">12</input><input type="%txt">Arial<options>serif&#xD;sans-serif&#xD;monospace&#xD;Arial&#xD;Arial Black&#xD;Verdana&#xD;Tahoma&#xD;Trebuchet MS&#xD;Impact&#xD;Times New Roman&#xD;Didot&#xD;Georgia&#xD;American Typewriter&#xD;Andalé Mono&#xD;Courier&#xD;Lucida Console&#xD;Monaco&#xD;Bradley Hand&#xD;Brush Script MT&#xD;Luminari&#xD;Comic Sans MS</options></input><input type="%txt" readonly="true">left<options>left&#xD;center&#xD;right</options></input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doDeclareVariables"><list><l>height</l><l>width</l></list></block><custom-block s="do %cs and restore pen"><script><block s="up"></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>90</l></block><custom-block s="write on stage %mlt size: %n font: %txt color: %txt"><block var="text"/><block var="size"/><block var="font"/><l>transparent</l></custom-block><block s="doSetVar"><l>height</l><block s="reportMonadic"><l><option>abs</option></l><block s="yPosition"></block></block></block><block s="doSetVar"><l>width</l><block s="xPosition"></block></block><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="align"/><l>right</l></list></block><script><block s="doChangeVar"><l>x</l><block s="reportVariadicProduct"><list><l>-1</l><block var="width"/></list></block></block></script><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="align"/><l>center</l></list></block><script><block s="doChangeVar"><l>x</l><block s="reportVariadicProduct"><list><l>-0.5</l><block var="width"/></list></block></block></script><list></list></block></script></block></script></custom-block><block s="doReport"><block s="reportNewList"><list><custom-block s="key: %s value: %s"><l>width</l><block var="width"/></custom-block><custom-block s="key: %s value: %s"><l>height</l><block var="height"/></custom-block><custom-block s="key: %s value: %s"><l>x</l><block var="x"/></custom-block><custom-block s="key: %s value: %s"><l>y</l><block var="y"/></custom-block></list></block></block></script></block-definition><block-definition s="write on stage %&apos;text&apos; size: %&apos;size&apos; font: %&apos;font&apos; color: %&apos;color&apos;" type="command" category="pen" helper="true"><header></header><code></code><translations></translations><inputs><input type="%mlt">Hello!</input><input type="%n">12</input><input type="%txt">Arial<options>serif&#xD;sans-serif&#xD;monospace&#xD;Arial&#xD;Arial Black&#xD;Verdana&#xD;Tahoma&#xD;Trebuchet MS&#xD;Impact&#xD;Times New Roman&#xD;Didot&#xD;Georgia&#xD;American Typewriter&#xD;Andalé Mono&#xD;Courier&#xD;Lucida Console&#xD;Monaco&#xD;Bradley Hand&#xD;Brush Script MT&#xD;Luminari&#xD;Comic Sans MS</options></input><input type="%txt">rgb(0,0,0)</input></inputs><script><custom-block s="load fancy text extension"></custom-block><block s="doApplyExtension"><l>ft_write_on_stage(text, size, font, color, sprite)</l><list><block var="text"/><block var="size"/><block var="font"/><block var="color"/><block s="reportGet"><l><option>self</option></l></block></list></block></script></block-definition><block-definition s="load fancy text extension" type="command" category="pen" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/fancy-text.js</l></list></block></script></block-definition><block-definition s="do %&apos;command&apos; and restore pen" type="command" category="pen" helper="true"><header></header><code></code><translations></translations><inputs><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>old x</l><l>old y</l><l>dir</l><l>pen down?</l><l>old color</l></list></block><block s="doSetVar"><l>old x</l><block s="xPosition"></block></block><block s="doSetVar"><l>old y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>pen down?</l><block s="getPenDown"></block></block><block s="doSetVar"><l>old color</l><block s="getPenAttribute"><l><option>r-g-b-a</option></l></block></block><block s="doRun"><block var="command"/><list></list></block><block s="up"></block><block s="gotoXY"><block var="old x"/><block var="old y"/></block><block s="setHeading"><block var="dir"/></block><block s="doIf"><block var="pen down?"/><script><block s="down"></block></script><list></list></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="old color"/></block></script></block-definition><block-definition s="load microworld" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/microworld.js</l></list></block><block s="doApplyExtension"><l>mw_load</l><list></list></block></script></block-definition><block-definition s="switch to language %&apos;language&apos; and broadcast %&apos;message&apos; with data %&apos;data&apos; show loading screen %&apos;loading screen&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt">en</input><input type="%s" readonly="true"><options>§_messagesMenu</options></input><input type="%s"></input><input type="%b">false</input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_ide_lang(langCode,message,payload,loadingScreen)</l><list><block var="language"/><block var="message"/><block var="data"/><block var="loading screen"/></list></block></script></block-definition><block-definition s="block spec %&apos;block&apos;" type="reporter" category="Microworld"><comment x="0" y="0" w="90" collapsed="false">Pass in ringified a ringified block to get its specs</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>mw_get_spec_from_block(block)</l><list><block var="block"/></list></block></block></script></block-definition><block-definition s="button label %&apos;label&apos; message %&apos;message&apos; data %&apos;data&apos;" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"><options>§_messagesMenu</options></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><custom-block s="key: %s value: %s"><l>label</l><block var="label"/></custom-block><custom-block s="key: %s value: %s"><l>message</l><block var="message"/></custom-block><custom-block s="key: %s value: %s"><l>payload</l><block var="data"/></custom-block></list></block></block></block></script></block-definition><block-definition s="set buttons in %&apos;location&apos; to %&apos;buttons&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true"><options>scripts&#xD;palette&#xD;corral&#xD;stage</options></input><input type="%l"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_buttons(location, buttons)</l><list><block var="location"/><block var="buttons"/></list></block></script></block-definition><block-definition s="stage button label %&apos;label&apos; message %&apos;message&apos; data %&apos;data&apos; x %&apos;x&apos; y %&apos;y&apos; anchor x %&apos;anchor x&apos; anchor y %&apos;anchor y&apos; font size %&apos;font size&apos;" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"><options>§_messagesMenu</options></input><input type="%s"></input><input type="%n">0</input><input type="%n">0</input><input type="%txt" readonly="true">left<options>left&#xD;middle&#xD;right</options></input><input type="%txt" readonly="true">top<options>top&#xD;middle&#xD;bottom</options></input><input type="%n">10</input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><custom-block s="key: %s value: %s"><l>definition</l><block s="reportTextSplit"><custom-block s="button label %txt message %txt data %s"><block var="label"/><block var="message"/><block var="data"/></custom-block><l><option>json</option></l></block></custom-block><custom-block s="key: %s value: %s"><l>appearance</l><block s="reportNewList"><list><custom-block s="key: %s value: %s"><l>x</l><block var="x"/></custom-block><custom-block s="key: %s value: %s"><l>y</l><block var="y"/></custom-block><custom-block s="key: %s value: %s"><l>anchorX</l><block var="anchor x"/></custom-block><custom-block s="key: %s value: %s"><l>anchorY</l><block var="anchor y"/></custom-block><custom-block s="key: %s value: %s"><l>fontSize</l><block var="font size"/></custom-block></list></block></custom-block></list></block></block></block></script></block-definition><block-definition s="microworld define %&apos;block&apos; %&apos;label&apos; %&apos;context&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%txt"></input><input type="%repRing"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_do_define_block(upvar, label, context)</l><list><block var="block"/><block var="label"/><block var="context"/></list></block></script></block-definition><block-definition s="button pic labeled %&apos;label&apos;" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt">my button</input></inputs><script><custom-block s="load microworld"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>mw_button_pic(definition)</l><list><custom-block s="button label %txt message %txt data %s"><block var="label"/><l></l><l></l></custom-block></list></block></block></script></block-definition><block-definition s="hide loading screen" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_hide_loading_screen</l><list></list></block></script></block-definition><block-definition s="show loading screen" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_show_loading_screen</l><list></list></block></script></block-definition><block-definition s="set loading screen after translate %&apos;loading screen&apos;" type="command" category="Microworld"><comment x="0" y="0" w="90" collapsed="false">Show a loading screen after the settings menu is used to changed languages. Loading screen will display until microworld is entered.</comment><header></header><code></code><translations></translations><inputs><input type="%b" readonly="true">false<options>§_messagesMenu</options></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_loading_screen_after_translate(showLoading)</l><list><block var="loading screen"/></list></block></script></block-definition><block-definition s="set active buttons in %&apos;location&apos; to %&apos;buttons&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true"><options>scripts&#xD;palette&#xD;corral&#xD;stage</options></input><input type="%l"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_active_buttons(location, labels)</l><list><block var="location"/><block var="buttons"/></list></block></script></block-definition><block-definition s="set broadcast after translate %&apos;message&apos;" type="command" category="Microworld"><comment x="0" y="0" w="90" collapsed="false">Broadcast a message after the IDE is translated into another language</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>§_messagesMenu</options></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_broadcast_after_translate(message)</l><list><block var="message"/></list></block></script></block-definition><block-definition s="set menu %&apos;menu&apos; to items %&apos;items&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>projectMenu&#xD;settingsMenu&#xD;languageMenu&#xD;blockContextMenu&#xD;paletteContextMenu&#xD;scriptsContextMenu&#xD;stageContextMenu&#xD;spriteContextMenu</options></input><input type="%txt"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_menu_items(menu,items)</l><list><block var="menu"/><block var="items"/></list></block></script></block-definition><block-definition s="set ide param %&apos;which&apos; to %&apos;val&apos;" type="command" category="Microworld"><comment x="0" y="0" w="254.66666666666666" collapsed="false">Allows changing global settings programmatically.&#xD;This block is for Boolean (checkbox) settings; use&#xD;SET VALUE for numeric or text values.&#xD;&#xD;Eisenberg&apos;s Law:  Anything you can do from the user interface you should be able to do in your program, and vice versa.  This library is just a beginning; there are many UI controls outside of the Settings menu.</comment><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Zoom blocks&#xD;Stage size&#xD;Stage scale&#xD;Presentation mode</options></input><input type="%s"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_snap_ide_set(param,value)</l><list><block var="which"/><block var="val"/></list></block></script></block-definition><block-definition s="switch to sprite %&apos;sprite&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true"><options>§_objectsMenu</options></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_switch_to_sprite(sprite)</l><list><block var="sprite"/></list></block></script></block-definition><block-definition s="exit microworld" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_escape</l><list></list></block></script></block-definition><block-definition s="enter microworld" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_enter</l><list></list></block></script></block-definition><block-definition s="microworld active?" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="load microworld"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>mw_is_active?</l><list></list></block></block></script></block-definition><block-definition s="set block buttons %&apos;specs&apos;" type="command" category="Microworld"><comment x="0" y="0" w="435.77050781249994" collapsed="false">set first item to &apos;all&apos; to allow editing of all blocks</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_button_blocks(specs)</l><list><block var="specs"/></list></block></script></block-definition><block-definition s="set editable block specs %&apos;specs&apos;" type="command" category="Microworld"><comment x="0" y="0" w="435.77050781249994" collapsed="false">set first item to &apos;all&apos; to allow editing of all blocks</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_editable_blocks(specs)</l><list><block var="specs"/></list></block></script></block-definition><block-definition s="set palette blocks %&apos;specs&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_block_specs(specs)</l><list><block var="specs"/></list></block></script></block-definition><block-definition s="set enable variables %&apos;enable&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%b">true</input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_enable_variables(enable)</l><list><block var="enable"/></list></block></script></block-definition><block-definition s="set enable keyboard %&apos;enable&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%b">true</input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_enable_keyboard(enable)</l><list><block var="enable"/></list></block></script></block-definition><block-definition s="set hidden UI features %&apos;morphs&apos;" type="command" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><custom-block s="load microworld"></custom-block><block s="doApplyExtension"><l>mw_set_hidden_morphs(morphs)</l><list><block var="morphs"/></list></block></script></block-definition><block-definition s="block specs %&apos;blocks&apos;" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%mult%repRing"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="block spec %repRing"><block s="reifyReporter"><script></script><list></list></block></custom-block></autolambda><list></list></block><block var="blocks"/></block></block></script></block-definition><block-definition s="list to comma-separated string %&apos;list&apos;" type="reporter" category="Microworld"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>output string</l></list></block><block s="doSetVar"><l>output string</l><block s="reportCombine"><block var="list"/><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l>,</l><l></l></list></block></autolambda><list></list></block></block></block><block s="doReport"><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="output string"/><l>0</l></list></block><l></l><block var="output string"/></block></block></script></block-definition><block-definition s="hidden UI features $nl %&apos;spriteBar&apos; sprite bar $nl %&apos;spriteCorral&apos; sprite corral $nl palette $nl $    -1 %&apos;categoryList&apos; category list $nl $    -1 %&apos;makeBlockButtons&apos; make block buttons $nl $    -1 %&apos;searchButton&apos; search button $nl control bar $nl $    -1 %&apos;steppingButton&apos; stepping button $nl $    -1 %&apos;startButton&apos; start button $nl $    -1 %&apos;pauseButton&apos; pause button" type="reporter" category="Microworld"><comment x="0" y="0" w="170.0400390625" collapsed="false">Generates a comma-separated string of the morphs to hide. Use with &apos;set hidden UI features...&apos; block&#xD;&#xD;Checked morphs are hidden</comment><header></header><code></code><translations></translations><inputs><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input></inputs><script><block s="doDeclareVariables"><list><l>hidden morphs</l></list></block><block s="doSetVar"><l>hidden morphs</l><block s="reportNewList"><list></list></block></block><block s="doIf"><block var="spriteBar"/><script><block s="doAddToList"><l>spriteBar</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="spriteCorral"/><script><block s="doAddToList"><l>spriteCorral</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="categoryList"/><script><block s="doAddToList"><l>categoryList</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="makeBlockButtons"/><script><block s="doAddToList"><l>makeBlockButtons</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="searchButton"/><script><block s="doAddToList"><l>searchButton</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="steppingButton"/><script><block s="doAddToList"><l>steppingButton</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="startButton"/><script><block s="doAddToList"><l>startButton</l><block var="hidden morphs"/></block></script><list></list></block><block s="doIf"><block var="pauseButton"/><script><block s="doAddToList"><l>pauseButton</l><block var="hidden morphs"/></block></script><list></list></block><block s="doReport"><custom-block s="list to comma-separated string %l"><block var="hidden morphs"/></custom-block></block></script></block-definition><block-definition s="costume from script: %&apos;script&apos;" type="reporter" category="looks"><comment x="0" y="0" w="259.8173828125" collapsed="false">Turns a ringified script into a script pic that can be used as a costume.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><custom-block s="load script pic costume extension"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>spc_script_to_costume(script)</l><list><block var="script"/></list></block></block></script></block-definition><block-definition s="load script pic costume extension" type="command" category="looks" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/script-pic-costume.js</l></list></block></script></block-definition><block-definition s="update custom block translations from translations %&apos;translations&apos;" type="command" category="Translations"><comment x="0" y="0" w="90" collapsed="false">Takes a list of block specs and translations in the format [block label, [language code, translated label]] and uses it to update any custom blocks that match this list.&#xD;&#xD;Translations are saved into the project, so this only needs to be run once when the translations are updated.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>label data</l><l>custom blocks</l></list></block><block s="doSetVar"><l>label data</l><custom-block s="extract %s from translation data %l"><l>label</l><block var="translations"/></custom-block></block><block s="doSetVar"><l>custom blocks</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportBlockAttribute"><l><option>custom?</option></l><block s="reifyReporter"><script></script><list></list></block></block></autolambda><list></list></block><block s="reportGet"><l><option>blocks</option></l></block></block></block><block s="doForEach"><l>current label translations</l><block var="label data"/><script><block s="doDeclareVariables"><list><l>all translated labels</l><l>block</l></list></block><block s="doSetVar"><l>all translated labels</l><custom-block s="all translated block labels for %txt from translations %l"><block s="reportListItem"><l>1</l><block var="current label translations"/></block><block var="translations"/></custom-block></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportListContainsItem"><block var="all translated labels"/><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block></block></autolambda><list></list></block><block var="custom blocks"/></block></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="block"/><l></l></list></block></block><script><block s="doSetBlockAttribute"><l><option>translations</option></l><block var="block"/><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>2</l><block var="item"/></block><l></l></list></block></block></autolambda><list><l>item</l></list></block><block s="reportListItem"><l>2</l><block var="current label translations"/></block></block></block></script><list></list></block></script></block></script></block></script></block-definition><block-definition s="extract %&apos;key&apos; from translation data %&apos;translations&apos;" type="reporter" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">label<options>label&#xD;inputs</options></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>block translation list</l><l>blocks</l></list></block><block s="doSetVar"><l>block translation list</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>blocks</l><custom-block s="extract block translation data from %l"><block var="translations"/></custom-block></block><block s="doForEach"><l>block</l><block var="blocks"/><script><block s="doAddToList"><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="block"/></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="translation data"/></block><custom-block s="value at key %s of %l"><block var="key"/><block s="reportListItem"><l>2</l><block var="translation data"/></block></custom-block></list></block></autolambda><list><l>translation data</l></list></block><block s="reportListItem"><l>2</l><block var="block"/></block></block></list></block><block var="block translation list"/></block></script></block><block s="doReport"><block var="block translation list"/></block></script></block-definition><block-definition s="extract block translation data from %&apos;translations&apos;" type="reporter" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>block translation list</l></list></block><block s="doSetVar"><l>block translation list</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>language row</l><block var="translations"/><script><block s="doDeclareVariables"><list><l>language code</l><l>blocks</l></list></block><block s="doSetVar"><l>language code</l><block s="reportListItem"><l>1</l><block var="language row"/></block></block><block s="doSetVar"><l>blocks</l><custom-block s="value at key %s of %l"><l>_blocks</l><block s="reportListItem"><l>2</l><block var="language row"/></block></custom-block></block><block s="doIf"><block s="reportIsA"><block var="blocks"/><l><option>list</option></l></block><script><block s="doForEach"><l>block</l><block var="blocks"/><script><block s="doDeclareVariables"><list><l>block label</l><l>block translation</l><l>block translation entries</l></list></block><block s="doSetVar"><l>block label</l><block s="reportListItem"><l>1</l><block var="block"/></block></block><block s="doSetVar"><l>block translation</l><block s="reportListItem"><l>2</l><block var="block"/></block></block><block s="doSetVar"><l>block translation entries</l><custom-block s="value at key %s of %l"><block var="block label"/><block var="block translation list"/></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="block translation entries"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>block translation entries</l><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="block translation"/><l></l></list></block></block><script><block s="doSetVar"><l>block translation list</l><custom-block s="set value %s at key %s of %l"><block s="reportCONS"><block s="reportNewList"><list><block var="language code"/><block var="block translation"/></list></block><block var="block translation entries"/></block><block var="block label"/><block var="block translation list"/></custom-block></block></script><list></list></block></script></block></script><list></list></block></script></block><block s="doReport"><block var="block translation list"/></block></script><scripts><script x="489.15234375" y="151.49999999999994"><block s="reportListItem"><l>2</l><block var="block"/></block></script><script x="403" y="387.49999999999994"><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="block"/></block><l><option>text</option></l></block><block s="reportListItem"><l>2</l><block var="block"/></block><custom-block s="value at key %s of %l"><l>label</l><block s="reportListItem"><l>2</l><block var="block"/></block></custom-block></block></script></scripts></block-definition><block-definition s="set value %&apos;value&apos; at key %&apos;key&apos; of %&apos;list&apos;" type="reporter" category="operators" helper="true"><comment x="0" y="0" w="90" collapsed="false">Inserts or updates the value of the provided key in the given list. Does not modify the original list. Providing an empty value will remove the corresponding key. </comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>remaining list</l></list></block><block s="doSetVar"><l>remaining list</l><block s="reportIfElse"><block s="reportIsA"><block var="list"/><l><option>list</option></l></block><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><l/></block><block var="key"/></list></block></block></autolambda><list></list></block><block var="list"/></block><block s="reportNewList"><list></list></block></block></block><block s="doReport"><block s="reportIfElse"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block var="value"/><l></l></list></block><block s="reportVariadicEquals"><list><block var="key"/><l></l></list></block></list></block><block var="remaining list"/><block s="reportCONS"><custom-block s="key: %s value: %s"><block var="key"/><block var="value"/></custom-block><block var="remaining list"/></block></block></block></script></block-definition><block-definition s="all translated block labels for %&apos;label&apos; from translations %&apos;translations&apos;" type="reporter" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>label translations</l><l>label data</l></list></block><block s="doSetVar"><l>label translations</l><block s="reportNewList"><list><block var="label"/></list></block></block><block s="doSetVar"><l>label data</l><custom-block s="value at key %s of %l"><block var="label"/><custom-block s="extract %s from translation data %l"><l>label</l><block var="translations"/></custom-block></custom-block></block><block s="doWarp"><script><block s="doIf"><block s="reportIsA"><block var="label data"/><l><option>list</option></l></block><script><block s="doForEach"><l>language</l><block var="label data"/><script><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>2</l><block var="language"/></block><l></l></list></block></block><script><block s="doAddToList"><block s="reportListItem"><l>2</l><block var="language"/></block><block var="label translations"/></block></script><list></list></block></script></block></script><list></list></block></script></block><block s="doReport"><block var="label translations"/></block></script></block-definition><block-definition s="translate input options with translations %&apos;translations&apos; fallback %&apos;fallback&apos;" type="command" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%code"></input><input type="%txt">en</input></inputs><script><custom-block s="load translations extension"></custom-block><block s="doDeclareVariables"><list><l>input translation data</l></list></block><block s="doSetVar"><l>input translation data</l><custom-block s="extract %s from translation data %l"><l>inputs</l><block var="translations"/></custom-block></block><block s="doApplyExtension"><l>t_translate_input_options(translations, fallback)</l><list><block var="input translation data"/><block var="fallback"/></list></block></script></block-definition><block-definition s="load translations extension" type="command" category="Translations" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/microworlds/translations.js</l></list></block></script></block-definition><block-definition s="custom block with label that translates to %label from translations %translations" type="reporter" category="Translations"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="add missing translation to %&apos;list&apos; language %&apos;language&apos; key %&apos;string&apos;" type="reporter" category="Translations"><comment x="0" y="0" w="90" collapsed="false">Reports the list of missing translations, including the specified language/key combination. The specified language/string combination is only added if it is not already present.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>list</l><block s="reportIfElse"><block s="reportNot"><block s="reportIsA"><block var="list"/><l><option>list</option></l></block></block><block s="reportNewList"><list></list></block><block var="list"/></block></block><block s="doSetVar"><l>list</l><block s="reportIfElse"><block s="reportVariadicIsIdentical"><list><custom-block s="value at key %s of %l"><block var="language"/><block var="list"/></custom-block><l></l></list></block><block s="reportCONS"><block s="reportNewList"><list><block var="language"/><block s="reportNewList"><list></list></block></list></block><block var="list"/></block><block var="list"/></block></block><block s="doSetVar"><l>list</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="current language"/></block><block var="language"/></list></block><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="current language"/></block><block s="reportIfElse"><block s="reportNot"><block s="reportListContainsItem"><block s="reportListItem"><l>2</l><block var="current language"/></block><block var="string"/></block></block><block s="reportCONS"><block var="string"/><block s="reportListItem"><l>2</l><block var="current language"/></block></block><block s="reportListItem"><l>2</l><block var="current language"/></block></block></list></block><block var="current language"/></block></autolambda><list><l>current language</l></list></block><block var="list"/></block></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="translate %&apos;translation key&apos; from translations %&apos;translations&apos; fallback language %&apos;fallback language&apos; missing handler %&apos;missing handler&apos; placeholders from list %&apos;placeholders&apos;" type="reporter" category="Translations"><comment x="0" y="0" w="206" collapsed="false">Translates the provided key from the list of translations using the following rules:&#xD;Translation in language of Snap! IDE (if translation exists)&#xD;Translation in fallback language (if translation exists)&#xD;If no translations are found, reports the key&#xD;&#xD;Missing handler is an optional command to run when a translation does not exist for the IDE&apos;s current language (e.g. to log strings that need to be translated). It receives two parameters: target language and missing key.&#xD;&#xD;Placeholders is a list of values to substitute into placeholders in the translation string. Placeholders are formatted as $1, $2, etc. The number corresponds to the position of the placeholder in the list, starting from 1 on the left.&#xD;&#xD;It is recommended to wrap this block in another custom block to avoid redundancy.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%l"></input><input type="%txt">en</input><input type="%s"></input><input type="%l"></input></inputs><script><custom-block s="load translations extension"></custom-block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="placeholders"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>placeholders</l><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doDeclareVariables"><list><l>translation string</l></list></block><block s="doSetVar"><l>translation string</l><custom-block s="value at key %s of %l"><l>translation string</l><custom-block s="get translation information for %txt from translations %l fallback language %txt missing handler %s"><block var="translation key"/><block var="translations"/><block var="fallback language"/><block var="missing handler"/></custom-block></custom-block></block><block s="doIfElse"><block s="reportIsA"><block var="translation string"/><l><option>text</option></l></block><script><block s="doReport"><block s="reportApplyExtension"><l>t_add_placeholders(string, placeholders)</l><list><block var="translation string"/><block var="placeholders"/></list></block></block></script><script><block s="doReport"><block var="translation string"/></block></script></block></script></block-definition><block-definition s="get translation information for %&apos;translation key&apos; from translations %&apos;translations&apos; fallback language %&apos;fallback language&apos; missing handler %&apos;missing handler&apos;" type="reporter" category="Translations"><comment x="0" y="0" w="335" collapsed="false">Reports the translated string (without filling in the placeholders) and translated language of the provided key from the list of translations using the following rules:&#xD;Translation string in language of Snap! IDE (if translation exists)&#xD;Translation string in fallback language (if translation exists)&#xD;Translation key if no translation is found&#xD;&#xD;Translation language matches the language of the translation string (lagnauge of the IDE or the fallback language if the string has not been translated). If the string is not found in any language, even the fallback language, the translation language is blank.&#xD;&#xD;Missing handler is an optional command to run when a translation does not exist for the IDE&apos;s current language (e.g. to log strings that need to be translated). It receives two parameters: target language and missing key.&#xD;&#xD;You won&apos;t often need to call this block directly unless you need to know the language of the translated string. One posisble use for this is setting the accent for text-to-speech using translated text.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%l"></input><input type="%txt">en</input><input type="%s"></input></inputs><script><block s="doSetVar"><l>translations</l><block s="reportIfElse"><block s="reportIsA"><block var="translations"/><l><option>list</option></l></block><block var="translations"/><block s="reportNewList"><list></list></block></block></block><block s="doDeclareVariables"><list><l>translation string</l><l>translation language</l></list></block><block s="doSetVar"><l>translation string</l><block var="translation key"/><comment w="80.00000000000001" collapsed="true">If we can&apos;t find a translation for this item, just display teh inmput text</comment></block><block s="doSetVar"><l>translation language</l><l></l></block><block s="doDeclareVariables"><list><l>translation passes</l><l>default language translations</l><l>language translations</l></list></block><block s="doSetVar"><l>default language translations</l><block s="reportIfElse"><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><custom-block s="value at key %s of %l"><block var="fallback language"/><block var="translations"/></custom-block></block><l>0</l></list></block></block><custom-block s="value at key %s of %l"><block var="fallback language"/><block var="translations"/></custom-block><block s="reportNewList"><list></list></block></block></block><block s="doSetVar"><l>language translations</l><block s="reportIfElse"><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><custom-block s="value at key %s of %l"><custom-block s="language"></custom-block><block var="translations"/></custom-block></block><l>0</l></list></block></block><custom-block s="value at key %s of %l"><custom-block s="language"></custom-block><block var="translations"/></custom-block><block s="reportNewList"><list></list></block></block></block><block s="doSetVar"><l>translation passes</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><l></l></block><l>0</l></list></block></block></autolambda><list></list></block><block s="reportNewList"><list><block s="reportNewList"><list><block var="fallback language"/><block var="default language translations"/></list></block><block s="reportNewList"><list><custom-block s="language"></custom-block><block var="language translations"/></list></block></list></block></block><comment w="82" collapsed="false">only include language that have translations</comment></block><block s="doForEach"><l>translation pass</l><block var="translation passes"/><script><block s="doDeclareVariables"><list><l>translation string?</l></list></block><block s="doSetVar"><l>translation string?</l><custom-block s="value at key %s of %l"><block var="translation key"/><block s="reportListItem"><l>2</l><block var="translation pass"/></block></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><block var="translation string?"/></block><l>0</l></list></block></block><script><block s="doSetVar"><l>translation string</l><block var="translation string?"/></block><block s="doSetVar"><l>translation language</l><block s="reportListItem"><l>1</l><block var="translation pass"/></block></block></script><list></list></block></script><comment w="90" collapsed="false">Check if each language has a translation for the given key. </comment></block><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportNot"><block s="reportVariadicEquals"><list><block var="translation language"/><custom-block s="language"></custom-block></list></block></block><block s="reportIsA"><block var="missing handler"/><l><option>command</option></l></block></list></block><script><block s="doRun"><block var="missing handler"/><list><custom-block s="language"></custom-block><block var="translation key"/></list></block></script><list></list><comment w="90" collapsed="false">add comment here...</comment></block><block s="doReport"><block s="reportNewList"><list><custom-block s="key: %s value: %s"><l>translation string</l><block var="translation string"/></custom-block><custom-block s="key: %s value: %s"><l>translation language</l><block var="translation language"/></custom-block></list></block></block></script></block-definition><block-definition s="language" type="reporter" category="Translations"><comment x="0" y="0" w="90" collapsed="false">Reports the language of the Snap! IDE.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>ide_language</l><list><l></l></list></block></block></script></block-definition><block-definition s="languages in translation %&apos;translation&apos;" type="reporter" category="Translations"><comment x="0" y="0" w="90" collapsed="false">Get a list of languages in the given translation list</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="translation"/></block></block></script></block-definition><block-definition s="IDE labels and languages limit to %&apos;limitLanguages&apos;" type="reporter" category="Translations"><comment x="0" y="0" w="90" collapsed="false">Reports all of the labels and languages built into Snap&apos;s translator. Limits to just a list of language codes, if provided.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportIsA"><block var="limitLanguages"/><l><option>list</option></l></block><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportListContainsItem"><block var="limitLanguages"/><block s="reportListItem"><l>2</l><l/></block></block></autolambda><list></list></block><block s="reportApplyExtension"><l>ide_translations</l><list></list></block></block><block s="reportApplyExtension"><l>ide_translations</l><list></list></block></block></block></script></block-definition><block-definition s="dropdown choice %&apos;choice 1&apos; translates to %&apos;choice 2&apos; from translations %&apos;translations&apos;" type="predicate" category="Translations"><comment x="0" y="0" w="224.9999999999999" collapsed="false">Tests whether two dropdown menu choices are equivalent, factoring in translations. Order of choices does not matter.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="dropdown choice %txt translates to %txt from equivalent options %l"><block var="choice 1"/><block var="choice 2"/><custom-block s="extract equivalent dropdown options from %l"><block var="translations"/></custom-block></custom-block></block></script></block-definition><block-definition s="extract equivalent dropdown options from %&apos;translations&apos;" type="reporter" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>equivalent values</l></list></block><block s="doSetVar"><l>equivalent values</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>input</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><custom-block s="extract %s from translation data %l"><l>inputs</l><block var="translations"/></custom-block></block><script><block s="doForEach"><l>block</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><block var="input"/></block><script><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>list</option></l></block><script><block s="doForEach"><l>field</l><block var="block"/><script><block s="doDeclareVariables"><list><l>field name</l><l>field options</l><l>current field</l></list></block><block s="doSetVar"><l>field name</l><block s="reportListItem"><l>1</l><block var="field"/></block></block><block s="doSetVar"><l>field options</l><custom-block s="value at key %s of %l"><l>options</l><block s="reportListItem"><l>2</l><block var="field"/></block></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><custom-block s="value at key %s of %l"><block var="field name"/><block var="equivalent values"/></custom-block><l><option>list</option></l></block></block><script><block s="doSetVar"><l>equivalent values</l><custom-block s="set value %s at key %s of %l"><block s="reportNewList"><list></list></block><block var="field name"/><block var="equivalent values"/></custom-block></block></script><list></list></block><block s="doSetVar"><l>current field</l><custom-block s="value at key %s of %l"><block var="field name"/><block var="equivalent values"/></custom-block></block><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="field options"/></block><script><block s="doIf"><block s="reportVariadicLessThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="current field"/></block><block var="i"/></list></block><script><block s="doAddToList"><block s="reportNewList"><list></list></block><block var="current field"/></block></script><list></list></block><block s="doAddToList"><block s="reportListItem"><block var="i"/><block var="field options"/></block><block s="reportListItem"><block var="i"/><block var="current field"/></block></block></script></block></script></block></script><list></list></block></script></block></script></block></script></block><block s="doReport"><block var="equivalent values"/></block></script></block-definition><block-definition s="dropdown choice %&apos;choice 1&apos; translates to %&apos;choice 2&apos; from equivalent options %&apos;equivalent values&apos;" type="predicate" category="Translations"><comment x="0" y="0" w="224.9999999999999" collapsed="false">Tests whether two dropdown menu choices are equivalent, factoring in translations. Order of choices does not matter.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>row</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><block var="equivalent values"/></block><script><block s="doForEach"><l>entry</l><block var="row"/><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportListContainsItem"><block var="entry"/><block var="choice 1"/></block><block s="reportListContainsItem"><block var="entry"/><block var="choice 2"/></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></script></block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script><scripts><script x="333" y="84.4999999999999"><block s="doDeclareVariables"><list><l>equivalent values</l></list></block><block s="doSetVar"><l>equivalent values</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>input</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><custom-block s="extract %s from translation data %l"><l>inputs</l><block var="translations"/></custom-block></block><script><block s="doForEach"><l>block</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><block var="input"/></block><script><block s="doIf"><block s="reportIsA"><block var="block"/><l><option>list</option></l></block><script><block s="doForEach"><l>field</l><block var="block"/><script><block s="doDeclareVariables"><list><l>field name</l><l>field options</l><l>current field</l></list></block><block s="doSetVar"><l>field name</l><block s="reportListItem"><l>1</l><block var="field"/></block></block><block s="doSetVar"><l>field options</l><custom-block s="value at key %s of %l"><l>options</l><block s="reportListItem"><l>2</l><block var="field"/></block></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><custom-block s="value at key %s of %l"><block var="field name"/><block var="equivalent values"/></custom-block><l><option>list</option></l></block></block><script><block s="doSetVar"><l>equivalent values</l><custom-block s="set value %s at key %s of %l"><block s="reportNewList"><list></list></block><block var="field name"/><block var="equivalent values"/></custom-block></block></script><list></list></block><block s="doSetVar"><l>current field</l><custom-block s="value at key %s of %l"><block var="field name"/><block var="equivalent values"/></custom-block></block><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="field options"/></block><script><block s="doIf"><block s="reportVariadicLessThan"><list><block s="reportListAttribute"><l><option>length</option></l><block var="current field"/></block><block var="i"/></list></block><script><block s="doAddToList"><block s="reportNewList"><list></list></block><block var="current field"/></block></script><list></list></block><block s="doAddToList"><block s="reportListItem"><block var="i"/><block var="field options"/></block><block s="reportListItem"><block var="i"/><block var="current field"/></block></block></script></block></script></block></script><list></list></block></script></block></script></block></script></scripts></block-definition><block-definition s="translate input defaults with translations %&apos;translations&apos; fallback %&apos;fallback&apos;" type="command" category="Translations"><header></header><code></code><translations></translations><inputs><input type="%code"></input><input type="%txt">en</input></inputs><script><custom-block s="load translations extension"></custom-block><block s="doDeclareVariables"><list><l>input translation data</l></list></block><block s="doSetVar"><l>input translation data</l><custom-block s="extract %s from translation data %l"><l>inputs</l><block var="translations"/></custom-block></block><block s="doWarp"><script><block s="doForEach"><l>block data</l><block var="input translation data"/><script><block s="doDeclareVariables"><list><l>translated labels</l><l>block</l></list></block><block s="doSetVar"><l>translated labels</l><custom-block s="all translated block labels for %txt from translations %l"><block s="reportListItem"><l>1</l><block var="block data"/></block><block var="translations"/></custom-block></block><block s="doSetVar"><l>block</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportListContainsItem"><block var="translated labels"/><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block></block></autolambda><list></list></block><block s="reportGet"><l><option>blocks</option></l></block></block></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="block"/><l></l></list></block></block><script><block s="doDeclareVariables"><list><l>language data</l><l>defaults</l></list></block><block s="doSetVar"><l>language data</l><block s="reportVariadicOr"><list><custom-block s="value at key %s of %l"><custom-block s="language"></custom-block><block s="reportListItem"><l>2</l><block var="block data"/></block></custom-block><custom-block s="value at key %s of %l"><block var="fallback"/><block s="reportListItem"><l>2</l><block var="block data"/></block></custom-block></list></block></block><block s="doSetVar"><l>defaults</l><block s="reportNewList"><list></list></block></block><block s="doIf"><block s="reportIsA"><block var="language data"/><l><option>list</option></l></block><script><block s="doForEach"><l>slot name</l><custom-block s="slot names of block %repRing"><block var="block"/></custom-block><script><block s="doDeclareVariables"><list><l>slot data</l></list></block><block s="doSetVar"><l>slot data</l><custom-block s="value at key %s of %l"><block var="slot name"/><block var="language data"/></custom-block></block><block s="doIfElse"><block s="reportIsA"><block var="slot data"/><l><option>list</option></l></block><script><block s="doAddToList"><custom-block s="value at key %s of %l"><l>default</l><block var="slot data"/></custom-block><block var="defaults"/></block></script><script><block s="doAddToList"><l></l><block var="defaults"/></block></script></block></script></block><block s="doSetBlockAttribute"><l><option>defaults</option></l><block var="block"/><block var="defaults"/></block></script><list></list></block></script><list></list></block></script></block></script></block></script></block-definition><block-definition s="slot names of block %&apos;block&apos;" type="reporter" category="control" helper="true"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><custom-block s="load translations extension"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>t_slot_names(block)</l><list><block var="block"/></list></block></block></script></block-definition></blocks><primitives></primitives><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="true" penlog="true" volume="100" pan="0" lines="flat" ternary="false" hyperops="true" codify="true" inheritance="true" sublistIDs="false" id="19466"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAEy5JREFUeF7t1W2NHUcQhtFdAsZiBOESAgkWUzKCYFkCDoJIrSlX15uac39Pf5260vP5/ePr14cfAQIECBBYKPDzx7fYV30KcOxsXIwAAQIEigICXAS0nAABAgQIPBEQ4Cdq1hAgQIAAgaKAABcBLSdAgAABAk8EBPiJmjUECBAgQKAoIMBFQMsJECBAgMATAQF+omYNAQIECBAoCghwEdByAgQIECDwRECAn6hZQ4AAAQIEigICXAS0nAABAgQIPBEQ4Cdq1hAgQIAAgaKAABcBLSdAgAABAk8EBPiJmjUECBAgQKAoIMBFQMsJECBAgMATAQF+omYNAQIECBAoCghwEdByAgQIECDwRECAn6hZQ4AAAQIEigICXAS0nAABAgQIPBEQ4Cdq1hAgQIAAgaKAABcBLSdAgAABAk8EBPiJmjUECBAgQKAoIMBFQMsJECBAgMATAQF+omYNAQIECBAoCghwEdByAgQIECDwRECAn6hZQ4AAAQIEigICXAS0nAABAgQIPBEQ4Cdq1hAgQIAAgaKAABcBLSdAgAABAk8EBPiJmjUECBAgQKAoIMBFQMsJECBAgMATAQF+omYNAQIECBAoCghwEdByAgQIECDwRECAn6hZQ4AAAQIEigICXAS0nAABAgQIPBEQ4Cdq1hAgQIAAgaKAABcBLSdAgAABAk8EBPiJmjUECBAgQKAoIMBFQMsJECBAgMATAQF+omYNAQIECBBYLPD5/ePr1+L3eRoBAgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbgUAQIECGwXEODtE/Y+AgQIEIgUEODIsbhUVeDnj2/VLawfEvjj76+hkx1L4K6AAN/1dtolAQG+BN1wjAA3oNoyUkCAI8fiUlUBAa4Kzq0X4Dl7J98VEOC73k67JCDAl6AbjhHgBlRbRgoIcORYXKoqIMBVwbn1Ajxn7+S7AgJ819tplwQE+BJ0wzEC3IBqy0gBAY4ci0tVBQS4Kji3XoDn7J18V0CA73o77ZKAAF+CbjhGgBtQbRkpIMCRY3GpqoAAVwXn1gvwnL2T7woI8F1vp10SEOBL0A3HCHADqi0jBQQ4ciwuVRUQ4Krg3HoBnrN38l0BAb7r7bRLAgJ8CbrhGAFuQLVlpIAAR47FpaoCAlwVnFsvwHP2Tr4rIMB3vZ12SUCAL0E3HCPADai2jBQQ4MixuFRVQICrgnPrBXjO3sl3BQT4rrfTLgkI8CXohmMEuAHVlpECAhw5FpeqCghwVXBuvQDP2Tv5roAA3/V22iUBAb4E3XCMADeg2jJSQIAjx+JSVQEBrgrOrRfgOXsn3xUQ4LveTrskIMCXoBuOEeAGVFtGCghw5FhcqiogwFXBufUCPGfv5LsCAnzX22mXBAT4EnTDMQLcgGrLSAEBjhyLS1UFBLgqOLdegOfsnXxXQIDvejvtkoAAX4JuOEaAG1BtGSkgwJFjcamqgABXBefWC/CcvZPvCgjwXW+nXRIQ4EvQDccIcAOqLSMFBDhyLC5VFRDgquDcegGes3fyXQEBvuvttEsCAnwJuuEYAW5AtWWkgABHjsWlqgICXBWcWy/Ac/ZOvisgwHe9nXZJQIAvQTccI8ANqLaMFBDgyLG4VFVAgKuCc+sFeM7eyXcFBPiut9MuCQjwJeiGYwS4AdWWkQICHDkWl6oKCHBVcG69AM/ZO/mugADf9XbaJQEBvgTdcIwAN6DaMlJAgCPH4lJVAQGuCs6tF+A5eyffFRDgu95OuyQgwJegG44R4AZUW0YKCHDkWFyqKpAY4H/+rL7q96//69vX79/UjgQIHAkI8BGTj/5vAgJ8NjEBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BAQ4A5Ve44LCPDZCAT4zMlXBDoEBLhD1Z7jAgJ8NgIBPnPyFYEOAQHuULXnuIAAn41AgM+cfEWgQ0CAO1TtOS4gwGcjEOAzJ18R6BD4/P718atjY3sSIECAAAEC/y0gwP4dBAgQIEBgQECAB9AdSYAAAQIEBNh/gAABAgQIDAgI8AC6IwkQIECAgAD7DxAgQIAAgQEBAR5AdyQBAgQIEBBg/wECBAgQIDAgIMAD6I4kQIAAAQIC7D9AgAABAgQGBAR4AN2RBAgQIEBAgP0HCBAgQIDAgIAAD6A7kgABAgQICLD/AAECBAgQGBAQ4AF0RxIgQIAAAQH2HyBAgAABAgMCAjyA7kgCBAgQICDA/gMECBAgQGBAQIAH0B1JgAABAgQE2H+AAAECBAgMCAjwALojCRAgQICAAPsPECBAgACBAQEBHkB3JAECBAgQEGD/AQIECBAgMCAgwAPojiRAgAABAgLsP0CAAAECBAYEBHgA3ZEECBAgQECA/QcIECBAgMCAgAAPoDuSAAECBAgIsP8AAQIECBAYEBDgAXRHEiBAgAABAfYfIECAAAECAwICPIDuSAIECBAgIMD+AwQIECBAYEBAgAfQHUmAAAECBATYf4AAAQIECAwIfH79+Pg1cK4jCRAgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwUE+NXj93gCBAgQmBIQ4Cl55xIgQIDAqwX+BXNSPlXgdNusAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="19467"></list></costumes><sounds><list struct="atomic" id="19468"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="221.53846153846143" y="162" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" hidden="true" costume="1" color="80,80,80,1" pen="tip" id="19473"><costumes><list id="19474"><item><ref mediaID="Minecraft_Sprite_cst_Square"></ref></item></list></costumes><sounds><list struct="atomic" id="19475"></list></sounds><blocks></blocks><variables></variables><scripts><script x="14" y="14"><block s="receiveGo"></block><block s="setHeading"><l>90</l></block><block s="doSetVar"><l>Game</l><block s="reportNewList"><list><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l><l>7</l></list></block><block s="reportNewList"><list><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l><l>3</l></list></block><block s="reportNewList"><list><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l><l>1</l></list></block></list></block></block><block s="doSetVar"><l>Size</l><block s="reportListAttribute"><l><option>dimensions</option></l><block var="Game"/></block></block><block s="hide"></block><block s="doForever"><script><block s="clear"></block><custom-block s="render each %upvar in table %l %cs"><l>cell</l><block var="Game"/><script><block s="doSwitchToCostume"><l>Square</l></block><block s="setEffect"><l><option>color</option></l><block s="reportVariadicProduct"><list><block var="cell"/><l>10</l></list></block></block><block s="doStamp"></block></script></custom-block></script></block></script><script x="540" y="66"><block s="receiveGo"></block><block s="doSetVar"><l>Position</l><block s="reportNewList"><list><l>7</l><l>5</l></list></block></block><block s="doForever"><script><block s="doWait"><l>0.1</l></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportListItem"><l>2</l><block var="Position"/></block><l>1</l></list></block><block var="Game"/></block></block><l>7</l></list></block><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block><l>7</l></block><block s="doReplaceInList"><l>2</l><block var="Position"/><block s="reportVariadicSum"><list><block s="reportListItem"><l>2</l><block var="Position"/></block><l>1</l></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportListItem"><l>1</l><block var="Position"/></block><l>1</l></list></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block></block><l>7</l></list></block><script><block s="doIf"><block s="reportKeyPressed"><l><option>d</option></l></block><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block><l>7</l></block><block s="doReplaceInList"><l>1</l><block var="Position"/><block s="reportVariadicSum"><list><block s="reportListItem"><l>1</l><block var="Position"/></block><l>1</l></list></block></block></script><list></list></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="Position"/></block><l>1</l></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block></block><l>7</l></list></block><script><block s="doIf"><block s="reportKeyPressed"><l><option>a</option></l></block><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block><l>7</l></block><block s="doReplaceInList"><l>1</l><block var="Position"/><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="Position"/></block><l>1</l></block></block></script><list></list></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportDifference"><block s="reportListItem"><l>2</l><block var="Position"/></block><l>1</l></block><block var="Game"/></block></block><l>7</l></list></block><script><block s="doIf"><block s="reportKeyPressed"><l><option>w</option></l></block><script><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block><l>7</l></block><block s="doReplaceInList"><l>2</l><block var="Position"/><block s="reportDifference"><block s="reportListItem"><l>2</l><block var="Position"/></block><l>2</l></block></block></script><list></list></block></script><list></list></block><block s="doIf"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportDifference"><block s="reportKeyPressed"><l><option>right arrow</option></l></block><block s="reportKeyPressed"><l><option>left arrow</option></l></block></block></list></block><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportListItem"><l>2</l><block var="Position"/></block><block s="reportDifference"><block s="reportKeyPressed"><l><option>down arrow</option></l></block><block s="reportKeyPressed"><l><option>up arrow</option></l></block></block></list></block><block var="Game"/></block></block><l>7</l></list></block><block s="reportVariadicEquals"><list><block var="Block"/><l>7</l></list></block></list></block><script><block s="doIf"><block s="reportKeyPressed"><l><option>space</option></l></block><script><block s="doReplaceInList"><block s="reportVariadicSum"><list><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportDifference"><block s="reportKeyPressed"><l><option>right arrow</option></l></block><block s="reportKeyPressed"><l><option>left arrow</option></l></block></block></list></block><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportListItem"><l>2</l><block var="Position"/></block><block s="reportDifference"><block s="reportKeyPressed"><l><option>down arrow</option></l></block><block s="reportKeyPressed"><l><option>up arrow</option></l></block></block></list></block><block var="Game"/></block><block var="Block"/></block></script><list></list></block></script><list></list></block><block s="doReplaceInList"><block s="reportListItem"><l>1</l><block var="Position"/></block><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="Position"/></block><block var="Game"/></block><l>2</l></block></script></block></script><script x="516.3896484375" y="1365.7500000000005"><block s="receiveGo"></block><block s="doSetVar"><l>Block</l><l>1</l></block></script><script x="757.3896484375" y="1482.7500000000005"><block s="receiveKey"><l><option>5</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>5</l></block></script><script x="746.3896484375" y="1544.7500000000005"><block s="receiveKey"><l><option>6</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>6</l></block></script><script x="752.3896484375" y="1609.750000000001"><block s="receiveKey"><l><option>7</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>7</l></block></script><script x="743.3896484375" y="1671.7500000000005"><block s="receiveKey"><l><option>8</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>8</l></block></script><script x="744.3896484375" y="1733.750000000001"><block s="receiveKey"><l><option>9</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>9</l></block></script><script x="501.3896484375" y="1716.7500000000005"><block s="receiveKey"><l><option>4</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>4</l></block></script><script x="505.3896484375" y="1659.7500000000002"><block s="receiveKey"><l><option>3</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>3</l></block></script><script x="506.3896484375" y="1596.7500000000005"><block s="receiveKey"><l><option>2</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>2</l></block></script><script x="509.3896484375" y="1540.7500000000005"><block s="receiveKey"><l><option>1</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>1</l></block></script><script x="506.3896484375" y="1476.7500000000005"><block s="receiveKey"><l><option>0</option></l><list></list></block><block s="doSetVar"><l>Block</l><l>0</l></block></script><script x="130" y="1307.3333333333326"><block s="receiveGo"></block><block s="doForever"><script><block s="doReplaceInList"><l><option>last</option></l><block s="reportListItem"><l>1</l><block var="Game"/></block><block var="Block"/></block></script></block></script></scripts></sprite><watcher var="THE EMPTY STREAM" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="Game" style="normal" x="4" y="5.000001999999995" color="243,118,29" hidden="true"/><watcher var="Size" style="normal" x="6" y="3.000001999999995" color="243,118,29" hidden="true"/><watcher var="Position" style="normal" x="10" y="102.000002" color="243,118,29" hidden="true"/><watcher var="Last Position" style="normal" x="10" y="123.00000399999999" color="243,118,29" hidden="true"/><watcher var="Block" style="normal" x="10" y="144.00000599999998" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="THE EMPTY STREAM"><list struct="atomic" id="20134">*the empty stream*</list></variable><variable name="Game"><list id="20135"><item><list struct="atomic" id="20136">7,7,7,7,7,7,7,7,7,7,7,7,1</list></item><item><list struct="atomic" id="20137">7,7,7,7,7,7,7,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20138">7,7,7,7,7,7,7,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20139">7,7,7,7,7,7,7,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20140">7,7,7,7,7,7,7,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20141">7,7,7,7,7,7,7,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20142">7,7,7,7,7,1,1,1,7,7,7,7,7</list></item><item><list struct="atomic" id="20143">7,7,7,7,7,1,2,7,7,7,7,7,7</list></item><item><list struct="atomic" id="20144">3,3,3,3,3,3,3,3,3,3,3,3,3</list></item><item><list struct="atomic" id="20145">1,1,1,1,1,1,1,1,1,1,1,1,1</list></item></list></variable><variable name="Size"><list struct="atomic" id="20146">10,13</list></variable><variable name="Position"><list struct="atomic" id="20147">7,8</list></variable><variable name="Block"><l>1</l></variable></variables></scene></scenes></project><media name="Minecraft" app="Snap! 10.7.2, https://snap.berkeley.edu" version="2"><costume name="Square" center-x="21" center-y="21" image="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHNuYXA9Imh0dHA6Ly9zbmFwLmJlcmtlbGV5LmVkdS9ydW4iIHZlcnNpb249IjEuMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0IiB2aWV3Qm94PSI3MjYgMjc5IDQyIDQyIiB3aWR0aD0iNDIiIGhlaWdodD0iNDIiPjxyZWN0IHN0cm9rZT0ibm9uZSIgZmlsbD0icmdiKDI0MiwwLDApIiBwcm90b3R5cGU9IlZlY3RvclJlY3RhbmdsZSIgd2lkdGg9IjQyIiBoZWlnaHQ9IjQyIiB4PSI3MjYiIHk9IjI3OSIvPjwvc3ZnPg==" mediaID="Minecraft_Sprite_cst_Square"/></media></snapdata>