<snapdata remixID="9219742"><project name="U5L1 - List generator blocks" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAL+klEQVR4Xu2dCXAVRRrH/49wBGrlPuROgLCwICAQ1ChnQFiWI8tRyMKKsEpxrZQoIC4WpyVyCbVbbBVryelKYBfCFZBwCEtxBBNEJAkhBy8X5IQACoRrqxtfk/Ag87bpyat6++8qKyHv62/e/OZn93RPz4zjwYMHD8BCAl4i4KCAXiLPzUoCFJAieJUABfQq/rLd+M6dO9G+ffuy3WixrV29ehVBQUGoXLmy+isF9NrhKNsNX7lyBYWFhXA4HIiMjET//v1x4MABhIaGQgwDxN+f5afIX6NGDcs84jsU/5+AApatB17b2vr169G1a1e5fSHg4MGDsXfvXly7dg3du3dHZmYmBgwYANFK5ubmyt9v376NLVu2oGfPnti9ezeCg4MREBCAlStXyt+7dOmCihUrSnEPHTqEoqIiDBo06OG53S9Cu3a4+L8DAwPZAnrNBC9teMmSJRgyZIhqAd99912sXr0aTZo0wZgxYxAVFYWcnBzUqlVL/hw5ciQSExMRHR2NsWPH4vDhw1LUjz/+GDdv3kTVqlXRp08fKWJ2djYKCgqwatUqjB492rIlbdasGQX0kgde2+zixYuVgM/S1T5rVy3qN2/enAJ6zQQvbXjRokVKwAYNGuCzgYGo73+/TL7NmL8fRGZRZdUyioGI6po5D1gmx8DrG/n000+VgLdvXEFg+HBEVR+ATqM+tOwydVvMI5FbEZa6XJwQImtclNpOy5YtKaDXjSjjL/DJJ59g6NChcqsp52LRPuYzFL0T8dRRa+PGjbC9Vy20rlbe8ptWaRwEzAjHvXv3ZOyNGzdw//59ZGVlISkhDn/K/Rsy3vpG5WnVqhUFtKTqYwELFy5UAqbGnUZ24vfoPmJCib0UAm3fvl22lPExJxG0YXKJz1uEpyNpRGN3Mg4Hyn9+SrZwxQUUI+v69evj11uGIH3MXlWvdevWFNDH/LLcnQULFk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dhKggHbSZW5LAhTQEhED7CRAAe2ky9yWBCigJSIG2EmAAtpJl7ktCVBAS0QMsJMABbSTLnNbEqCAlogYYCcBCmgnXea2JEABLRExwE4CFNBOusxtSYACWiJigJ0EKKCddJnbkgAFtETEADsJUEA76TK3JQEKaImIAXYSoIB20mVuSwIU0BIRA+wkQAGfQnfdunXyFfXiJm4W+whQwFLYhoWFyRfwXb9+HeIRt+Lp7tWrV7fvaPwfZqaApRx08boB8X4N12tIRah4vIR4etTbb7+N4OBgKSiLPgEKaMFu2LBh6qE+xUPFE+XFwxfFQ73FK0pZ9AhQwFK4iSeKut4CfuvWLfn4MfEKg379+unRZi03AhTwKVKIl/tlZ2ejXbt2EE8XLd4N0yNzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEGAAmpAYxVzBCigOZbMpEHgv8N+MPOQ/JiwAAAAAElFTkSuQmCC</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAA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gIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="0.23255813953483084" y="-0.6976744186046346" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><custom-block s="Linear search for %s in list %l"><l>1</l><block var="List to search"/></custom-block></script><script x="20" y="54"><custom-block s="Binary search for %s in the list %l"><l>198</l><block var="List to search"/></custom-block></script><script x="20" y="88"><custom-block s="are the items in the list %l disctinct?"><block var="List to search"/></custom-block></script><script x="20" y="122"><custom-block s="are the items in the sorted list %l distinct?"><block var="List to search"/></custom-block></script><script x="20" y="156"><block s="doSetVar"><l>List to search</l><custom-block s="Sorted list of %s numbers repeats %b"><l>100</l><l><bool>true</bool></l></custom-block></block></script><script x="20" y="199"><custom-block s="Unsorted list of %s numbers"><l>10</l></custom-block></script><script x="20" y="232"><custom-block s="sum of numbers from 1 to %n"><l>1000</l></custom-block></script><script x="20" y="265"><custom-block s="2 sum of numbers from 1 to %n"><l>1000</l></custom-block></script><script x="20" y="298"><custom-block s="3 sum of numbers from 1 to %n"><l>1000</l></custom-block></script><script x="20" y="331"><custom-block s="find item %s in sorted list w/repeats"><l>12</l></custom-block></script><script x="20" y="364"><custom-block s="time function %repRing"><block s="reifyReporter"><script></script><list></list></block></custom-block></script></scripts></sprite><watcher var="List to search" style="normal" x="367" y="8" color="243,118,29" extX="80" extY="70"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="Unsorted list of %&apos;n&apos; numbers" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>List</l></list></block><block s="doSetVar"><l>List</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block var="n"/><script><block s="doAddToList"><block s="reportRandom"><l>1</l><block var="n"/></block><block var="List"/></block></script></block><block s="doReport"><block var="List"/></block></script></block-definition><block-definition s="Sorted list of %&apos;n&apos; numbers repeats %&apos;repeat&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%b"></input></inputs><script><block s="doDeclareVariables"><list><l>Output</l><l>item</l><l>Start</l></list></block><block s="doIfElse"><block var="repeat"/><script><block s="doSetVar"><l>Start</l><l>0</l></block></script><script><block s="doSetVar"><l>Start</l><l>1</l></block></script></block><block s="doSetVar"><l>Output</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>item</l><l>1</l></block><block s="doRepeat"><block var="n"/><script><block s="doChangeVar"><l>item</l><block s="reportRandom"><block var="Start"/><l>4</l></block></block><block s="doAddToList"><block var="item"/><block var="Output"/></block></script></block><block s="doReport"><block var="Output"/></block></script></block-definition><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">LABEL will stamp text on the stage at the given font size. The direction of the text is the direction the sprite is facing, and color will match the pen color.</comment><header></header><code></code><translations></translations><inputs><input type="%txt">Hello!</input><input type="%n">12</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>text</l><l>size</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    context = stage.penTrails().getContext(&apos;2d&apos;),&#xD;    rotation = radians(this.direction() - 90),&#xD;    trans = new Point(&#xD;      this.center().x - stage.left(),&#xD;      this.center().y - stage.top()&#xD;    ),&#xD;    isWarped = this.Warped,&#xD;    len,&#xD;    pos;&#xD;&#xD;if (isWarped) {endWarp(); }&#xD;context.save();&#xD;context.font = size + &apos;px monospace&apos;;&#xD;context.textAlign = &apos;left&apos;;&#xD;context.textBaseline = &apos;alphabetic&apos;;&#xD;context.fillStyle = this.color.toString();&#xD;len = context.measureText(text).width;&#xD;trans = trans.multiplyBy(1 / stage.scale);&#xD;context.translate(trans.x, trans.y);&#xD;context.rotate(rotation);&#xD;context.fillText(text, 0, 0);&#xD;context.translate(-trans.x, -trans.y);&#xD;context.restore();&#xD;pos = new Point(&#xD;  len * Math.sin(radians(this.direction())),&#xD;  len * Math.cos(radians(this.direction())));&#xD;pos = pos.add(new Point(this.xPosition(), this.yPosition()));&#xD;this.gotoXY(pos.x, pos.y, false);&#xD;this.changed();&#xD;if (isWarped) {this.startWarp(); }&#xD;stage.changed();</l></block><list><block var="text"/><block var="size"/></list></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><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>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportListItem"><l>1</l><block var="data lists"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><custom-block s="empty? %l"><block s="reportCDR"><block var="lists"/></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&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="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data"/></block></block></script></block><block s="doReport"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="combine with %repRing items of %l"><block var="function"/><block s="reportCDR"><block var="data"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; then %&apos;true&apos; else %&apos;false&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%anyUE"></input><input type="%anyUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doReport"><block s="evaluate"><block var="true"/><list></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="false"/><list></list></block></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><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="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="words"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block></script><scripts><script x="229.000003" y="196.77778077777774"><block s="reportJoinWords"><list><l></l><l></l></list></block></script></scripts></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><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></block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations></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></translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><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></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations></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="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></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"><header></header><code></code><translations></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></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block></script></block-definition><block-definition s="tell %&apos;sprite&apos; to %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%cs"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block var="action"/><block var="sprite"/></block><list></list></block></script></block-definition><block-definition s="ask %&apos;sprite&apos; for %&apos;expression&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportAttributeOf"><block var="expression"/><block var="sprite"/></block><list></list></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block></script></block-definition><block-definition s="Linear search for %&apos;text&apos; in list %&apos;list&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>guess</l></list></block><block s="doSetVar"><l>guess</l><l>0</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>guess</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="text"/></block><script><block s="doReport"><block var="guess"/></block></script></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="item"/><block var="text"/></block></block><script><block s="doReport"><l>item not found</l></block></script></block></script></block-definition><block-definition s="Binary search for %&apos;text&apos; in the list %&apos;list&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>max</l><l>min</l><l>guess</l></list></block><block s="doSetVar"><l>max</l><block s="reportListLength"><block var="list"/></block></block><block s="doSetVar"><l>min</l><l>0</l></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="max"/><block var="min"/></block><l>2</l></block></block></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="text"/></block><script><block s="doUntil"><block s="reportEquals"><block var="text"/><block s="reportListItem"><block var="guess"/><block var="list"/></block></block><script><block s="doIf"><block s="reportLessThan"><block var="text"/><block s="reportListItem"><block var="guess"/><block var="list"/></block></block><script><block s="doSetVar"><l>max</l><block var="guess"/></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="max"/><block var="min"/></block><l>2</l></block></block></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="text"/><block s="reportListItem"><block var="guess"/><block var="list"/></block></block><script><block s="doSetVar"><l>min</l><block var="guess"/></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="max"/><block var="min"/></block><l>2</l></block></block></block></script></block></script></block><block s="doFor"><l>i</l><l>1</l><l>100000</l><script><block s="doIfElse"><block s="reportEquals"><block s="reportListItem"><block s="reportDifference"><block var="guess"/><block var="i"/></block><block var="list"/></block><block s="reportListItem"><block var="guess"/><block var="list"/></block></block><script><block s="doSetVar"><l>guess</l><block s="reportDifference"><block var="guess"/><block var="i"/></block></block><block s="doReport"><block var="guess"/></block></script><script><block s="doReport"><block var="guess"/></block></script><comment w="90" collapsed="false">This is the extra credit part.</comment></block></script></block></script><script><block s="doReport"><l>item not found</l></block></script></block></script></block-definition><block-definition s="are the items in the list %&apos;list&apos; disctinct?" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doFor"><l>Main item</l><l>1</l><block s="reportDifference"><block s="reportListLength"><block var="list"/></block><l>1</l></block><script><block s="doFor"><l>Check item</l><block s="reportSum"><block var="Main item"/><l>1</l></block><block s="reportListLength"><block var="list"/></block><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="Check item"/><block var="list"/></block><block s="reportListItem"><block var="Main item"/><block var="list"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="are the items in the sorted list %&apos;list&apos; distinct?" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>check item</l></list></block><block s="doFor"><l>Main item</l><l>1</l><block s="reportDifference"><block s="reportListLength"><block var="list"/></block><l>1</l></block><script><block s="doSetVar"><l>check item</l><block s="reportSum"><block var="Main item"/><l>1</l></block></block><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="check item"/><block var="list"/></block><block s="reportListItem"><block var="Main item"/><block var="list"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="distinct? %&apos;list&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>number</l><l>list 2</l></list></block><block s="doSetVar"><l>list 2</l><block var="list"/></block><block s="doRepeat"><block s="reportListLength"><block var="list 2"/></block><script><block s="doSetVar"><l>number</l><block s="reportListItem"><l>1</l><block var="list 2"/></block></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportCDR"><block var="list 2"/></block><block var="number"/></block></block><script><block s="doDeleteFromList"><l>1</l><block var="list 2"/></block></script></block></script></block><block s="doReport"><block s="reportEquals"><block var="list 2"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="distict? %&apos;list&apos; in sorted list" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>number</l><l>list 2</l></list></block><block s="doSetVar"><l>list 2</l><block s="reportNewList"><list></list></block></block><block s="doAddToList"><block var="list"/><block var="list 2"/></block><block s="doRepeat"><block s="reportListLength"><block var="list"/></block><script><block s="doSetVar"><l>number</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="list 2"/></block></block></block><block s="doIf"><block s="reportEquals"><block var="number"/><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="list 2"/></block></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="number"/><block s="reportListItem"><l>2</l><block var="list 2"/></block></block></block><script><block s="doDeleteFromList"><l>1</l><block s="reportListItem"><l>1</l><block var="list 2"/></block></block></script></block></script></block><block s="doReport"><block s="reportEquals"><block var="list 2"/><block s="reportNewList"><list><block s="reportNewList"><list></list></block></list></block></block></block></script></block-definition><block-definition s="sum of numbers from 1 to %&apos;input&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>sum</l></list></block><block s="doSetVar"><l>sum</l><l>0</l></block><block s="doFor"><l>numbers</l><l>1</l><block var="input"/><script><block s="doSetVar"><l>sum</l><block s="reportSum"><block var="numbers"/><block var="sum"/></block></block></script></block><block s="doReport"><block var="sum"/></block></script></block-definition><block-definition s="2 sum of numbers from 1 to %&apos;input&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportProduct"><block s="reportSum"><l>1</l><block var="input"/></block><block var="input"/></block><l>2</l></block></block></script></block-definition><block-definition s="3 sum of numbers from 1 to %&apos;input&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportCombine"><block s="reportNumbers"><l>1</l><block var="input"/></block><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="find item %&apos;input&apos; in sorted list w/repeats" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportRound"><block s="reportQuotient"><block var="input"/><l>2</l></block></block></block></script></block-definition><block-definition s="time function %&apos;function&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>start time</l></list></block><block s="doSetVar"><l>start time</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><custom-block s="ignore %s"><block s="evaluate"><block var="function"/><list></list></block></custom-block><block s="doReport"><block s="reportDifference"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="start time"/></block></block></script></block-definition><block-definition s="ignore %&apos;result&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs></block-definition></blocks><variables><variable name="List to search"><list struct="atomic" id="1155">3,4,8,10,10,13,13,17,21,21,24,28,28,29,30,30,33,34,35,38,42,43,46,47,47,48,48,51,54,58,59,59,60,62,63,65,68,70,71,72,72,75,75,78,82,83,83,84,84,87,91,94,98,100,102,106,107,111,115,118,118,120,120,121,123,124,125,127,130,134,136,136,140,142,142,144,144,148,150,153,155,157,157,159,159,162,166,168,170,173,176,176,176,177,180,182,184,185,186,188</list></variable></variables></project><media name="U5L1 - List generator blocks" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>