<snapdata remixID="10942058"><project name="4.4 NumberCruncher starter code" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAB4JJREFUeF7tnX9I1HcYx9/n3U0jQyuZkaumuWSrlHJeFAZlo1xhUo4ZybY2KGigjWD7KwiC7S/XgsEgEDbcHzOQpEZrDNvawBREXW20VurcFJfzV87f6Xnj+5GMS8/row+0z6f3Fw7vx/N97nlez4v7fu9zwtcVCAQC4EYCT4iAiwI+IfJ8W0WAAlKEJ0pgRgHr6uqwatUquN1u8eJ6e3vh9XqxYsUK8dxMaB6BaQJWVlYq+R5383rcuF7yAfw9bWF38RW8j+H4VPT19WHx4sVYvXp12H0YYDeBIAFramqwaNEi1XFtbS0yMjKmur99+zaSk5MRERERROTn6h/x6q2P8Iz74fPebe/C31yDib/qg2I9WcfQ9Fy2eq6xsRG5ubl202V3YQkECdjW1obOzk6109mzZxEdHY2Ojg5kZ2fj0qVLyMvLQ3V1NTwej7o5j6/X/ITcpmJ43a6pN/O+8p66P1Z5JqgAd1YRbj27Y/K1sTH4fL6wBTLAbgJBAjqfSt3d3arjkpISJCQkwO/3Y8mSJbhy5Qq2bNmizgsdeZzb7t278WttFfa3fBIkYNQ7X8LfXI2xq59NE/BG7Fb13NDQELZv3243XXYXlkCQgPX19RgYGIDLNflpFhcXh9HRUfXYOTT39/dP/Z2YmIBza7h2FXl/ngkSMNS7Tmw9iusxmerlnp4eHoLDjsf+gGlfQs6fPw9nbTomJuaxune+0cb3/oJAx63Z4z1RGEw7gHv37qG9vV19mjrnlNyebgIzLsM4h9u7d++qw6/0tnLlSqSlpU2ldc45FyxYwGUZadCG5Jv3MsyjfQ739+GPspPw90+eS4baXK4IvHz0Y4xExaGrqwvLly/XWv4xhC/LDEMg5DLMXMnVfVeO3PYSeBNeQmCkH4HeyfVBz4Z9CAz1wv/71anUQxlvo/PF19XjlpYW7NmzZ65vy/0MJRByGaahoQEnTpxAUVGRWo6pqKhAUlIS7ty5g0OHDqG4uBgFBQW4cOGC+rLiLCwfP34cDZUVeO2fz+FJ8sG7+U2MflUIV1wSPCnbEBgfQUR8Cu5fPKlwDaS/hb9f2K/ut7a2Yu/evYZiZNlzJRByGaa8vBw3b95EYWEhmpub1fqgsx54+fJlDA8PY3x8XEnnLN2kpqZi48aN6lzuxg8Xkd9dCk/yZnhSczB+42u4n8/A2PefwrvjGFyR0bj/zYeq3n83vIHWxEnpmpqacPDgwbn2wf0MJTDrMky4npxfS5YtW6a+zTrLNc7227XvcKDrC0REPFyYDpWna+0BtCbmqJedb8c5OZP3uT09BOa9DPMoKme9MKbxWwQGJn9RCbW5omIwsHafEu/Bry1Lly59esizU0VgxmUYRwrnd2Hn1w5nTdBZiH6c/1t9sICtw3bNmjVISUnR2YWxFhHg/wNaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVCmji1CyqmQJaNEwTW6GAJk7NopopoEXDNLEVChhiaqWlpcjPz0dkZKSJczWmZgoYYlTOhXpOnTqF2NhYdY28+Ph47Nq1y5jBmlIoBZxlUufOnUNZWdlUxMjICBITE+Hz+ZCeno7169ebMuf/bZ0UMMxodu7ciYULF06Lci5nlpmZicOHD8O5Cjy3uRGggLNwO3LkiLpMrbM5l6h1rmm3bt06bNq0SV2iltv8CVDAEAxPnz6Nqqoqdf7nfMJlZWXB6/XOnzgzBBGggCGEGBwcnPHQS39kCVBAWZ7MpkmAAmoCY7gsAQooy5PZNAlQQE1gDJclQAFleTKbJgEKqAmM4bIEKKAsT2bTJEABNYExXJYABZTlyWyaBCigJjCGyxKggLI8mU2TAAXUBMZwWQIUUJYns2kSoICawBguS4ACyvJkNk0CFFATGMNlCVBAWZ7MpkmAAmoCY7gsAQooy5PZNAlQQE1gDJclQAFleTKbJgEKqAmM4bIEKKAsT2bTJEABNYExXJYABZTlyWyaBCigJjCGyxKggLI8mU2TAAXUBMZwWQIUUJYns2kSoICawBguS4ACyvJkNk0CFFATGMNlCVBAWZ7MpkmAAmoCY7gsAQooy5PZNAlQQE1gDJclQAFleTKbJgEKqAmM4bIEKKAsT2bTJEABNYExXJYABZTlyWyaBCigJjCGyxKggLI8mU2TAAXUBMZwWQIUUJYns2kSoICawBguS4ACyvJkNk0CFFATGMNlCVBAWZ7MpkmAAmoCY7gsAQooy5PZNAlQQE1gDJclQAFleTKbJgEKqAmM4bIEKKAsT2bTJEABNYExXJbAfx0dbsan3yDTAAAAAElFTkSuQmCC</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" hyperops="true" codify="false" inheritance="false" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="0" y="-1.1320754716981014" 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><comment x="30.666666666666657" y="47.99999999999997" w="402" collapsed="false">1. Write a custom reporter block that takes a list as an argument and reports the sum of all the numbers in the list.  &#xD;&#xD;You may assume that all items in the list passed as the argument will be numbers.</comment><script x="30.666666666666657" y="161.99999999999991"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (sum of %l ) = %n"><block s="reportNewList"><list></list></block><l>0</l></custom-block><custom-block s="make test (sum of %l ) = %n"><block s="reportNewList"><list><l>1</l></list></block><l>1</l></custom-block><custom-block s="make test (sum of %l ) = %n"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l></list></block><l>10</l></custom-block><custom-block s="make test (sum of %l ) = %n"><block s="reportNewList"><list><l>1</l><l>2</l><l>-1</l><l>-2</l></list></block><l>0</l></custom-block><custom-block s="make test (sum of %l ) = %n"><block s="reportNewList"><list><l>-1</l><l>-2</l><l>-3</l><l>-4</l></list></block><l>-10</l></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="30.666666666666657" y="319.0000000000009" w="401" collapsed="false">2. Write a custom reporter block that takes a list as an argument and reports the average of all the numbers in the list.  &#xD;&#xD;You may assume that all items in the list passed as the argument will be numbers.</comment><script x="30.666666666666657" y="403.0000000000008"><custom-block s="average of %l"><block s="reportNewList"><list><l>13</l><l>26</l><l>-4</l><l>-12</l></list></block><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><script x="31.666666666666657" y="428.9999999999999"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (average of %l ) = %n"><block s="reportNewList"><list></list></block><l>0</l></custom-block><custom-block s="make test (average of %l ) = %n"><block s="reportNewList"><list><l>42</l></list></block><l>42</l></custom-block><custom-block s="make test (average of %l ) = %n"><block s="reportNewList"><list><l>13</l><l>26</l><l>-4</l><l>-12</l></list></block><l>5.75</l></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="31.666666666666657" y="556.9999999999983" w="401" collapsed="false">3. Write a custom predicate that takes a list as an argument and reports: &#xD;    true if the list contains at least one negative number&#xD;    false if all numbers are positive.  &#xD;&#xD;You may assume that all items in the list passed as the argument will be numbers.</comment><script x="31.666666666666657" y="654.9999999999974"><custom-block s="%l includes negative?"><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><comment x="31.666666666666657" y="987.9999999999992" w="401" collapsed="false">4. Write a custom predicate that takes a list of numbers as an argument and reports:&#xD;  true if each value in the list is greater than the one before it&#xD;  false otherwise.  &#xD;&#xD;You may assume that all items in the list passed as the argument will be numbers.</comment><script x="31.666666666666657" y="1084.000000000002"><custom-block s="%l is increasing?"><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><script x="31.666666666666657" y="1111.0000000000025"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>42</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>1</l><l>2</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>2</l><l>1</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>2</l><l>1</l><l>2</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>2</l><l>1</l><l>3</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>1</l><l>2</l><l>2</l><l>3</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>-4</l><l>9</l><l>1</l><l>8</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>-6</l><l>-2</l><l>2</l><l>3</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>-8</l><l>9</l><l>-3</l><l>5</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>-1</l><l>-7</l><l>-7</l><l>-3</l><l>0</l><l>6</l><l>9</l><l>10</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l is increasing?&gt; = %b"><block s="reportNewList"><list><l>-1</l><l>-7</l><l>-7</l><l>3</l><l>0</l><l>6</l><l>9</l><l>10</l></list></block><l><bool>false</bool></l></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="31.666666666666657" y="1438.000000000006" w="401" collapsed="false">5. Write a custom reporter that takes a list of numbers as an argument and reports the largest number in the list.  &#xD;&#xD;You may assume that all items in the list passed as the argument will be numbers.&#xD;You may assume that the list will not be empty.</comment><script x="31.666666666666657" y="1534.0000000000057"><custom-block s="maximum of %l"><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><script x="31.666666666666657" y="1560.000000000006"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (maximum of %l ) = %n"><block s="reportNewList"><list><l>1</l></list></block><l>1</l></custom-block><custom-block s="make test (maximum of %l ) = %n"><block s="reportNewList"><list><l>-42</l></list></block><l>-42</l></custom-block><custom-block s="make test (maximum of %l ) = %n"><block s="reportNewList"><list><l>-42</l><l>16</l><l>50</l></list></block><l>50</l></custom-block><custom-block s="make test (maximum of %l ) = %n"><block s="reportNewList"><list><l>-42</l><l>1000000</l><l>50</l></list></block><l>1000000</l></custom-block><custom-block s="make test (maximum of %l ) = %n"><block s="reportNewList"><list><l>-42</l><l>-1000000</l><l>-50</l></list></block><l>-42</l></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="582.6666666666663" y="47.99999999999997" w="401" collapsed="false">1. Write a custom reporter that takes a list of numbers as an argument and reports a *NEW* list that it the same as the argument, except that all negative numbers have been replaced with their absolute values.  &#xD;&#xD;You must not modify the argument list.  &#xD;You may assume that all items in the list passed as the argument will be numbers.</comment><comment x="583.6666666666663" y="10.000000000000014" w="402" collapsed="true">Part 2: Transforming Lists</comment><script x="583.6666666666663" y="155.99999999999991"><custom-block s="absolute value of %l"><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><script x="583.6666666666663" y="183.99999999999997"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list></list></block><block s="reportNewList"><list></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>1</l></list></block><block s="reportNewList"><list><l>1</l></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>-1</l></list></block><block s="reportNewList"><list><l>1</l></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>-1</l><l>2</l><l>3</l></list></block><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>-1</l><l>-2</l><l>3</l></list></block><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>-3</l></list></block><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block></custom-block><custom-block s="make test (absolute value of %l ) = %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>-3</l><l>-8</l><l>12</l></list></block><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>8</l><l>12</l></list></block></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="583.6666666666663" y="422.0000000000001" w="401" collapsed="false">2. Write a custom reporter that takes a list of integers as an argument and reports a *NEW* list that contains only even numbers from the argument list.  The result list should have its values in the same order as the original list, but with the odd integers removed.  &#xD;&#xD;You must not modify the argument list.  &#xD;You may assume that all items in the list passed as the argument will be integers.&#xD;&#xD;(Remember that the &quot;mod&quot; block can be useful in determining whether or not a number is even.)</comment><script x="582.6666666666663" y="579.9999999999978"><custom-block s="only evens of %l"><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><script x="582.6666666666663" y="607.9999999999978"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (only evens of %l ) = %l"><block s="reportNewList"><list></list></block><block s="reportNewList"><list></list></block></custom-block><custom-block s="make test (only evens of %l ) = %l"><block s="reportNewList"><list><l>1</l></list></block><block s="reportNewList"><list></list></block></custom-block><custom-block s="make test (only evens of %l ) = %l"><block s="reportNewList"><list><l>2</l><l>1</l></list></block><block s="reportNewList"><list><l>2</l></list></block></custom-block><custom-block s="make test (only evens of %l ) = %l"><block s="reportNewList"><list><l>2</l><l>-2</l><l>-9</l><l>-3</l><l>5</l><l>8</l><l>6</l></list></block><block s="reportNewList"><list><l>2</l><l>-2</l><l>8</l><l>6</l></list></block></custom-block><custom-block s="make test (only evens of %l ) = %l"><block s="reportNewList"><list><l>7</l><l>10</l><l>1</l><l>-8</l><l>7</l><l>-7</l><l>4</l></list></block><block s="reportNewList"><list><l>10</l><l>-8</l><l>4</l></list></block></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="582.6666666666663" y="788.9999999999976" w="401" collapsed="false">3. Write a custom reporter that takes two lists of numbers as arguments and reports a *NEW* list that contains the sum of the corresponding values from each argument list.&#xD;&#xD;For example:&#xD;  If the arguments were (1 4 6) and (2 2 3)&#xD;  The result would be (1+2 4+2 6+3) = (3 6 9)&#xD;&#xD;You must not modify the argument lists.  &#xD;You may assume that all items in the lists passed as the arguments will be numbers&#xD;You may assume that the argument lists are the same length.</comment><script x="583.6666666666663" y="953.9999999999983"><custom-block s="element-wise sum of %l and %l"><l/><l/><comment w="90" collapsed="true">Implement Me</comment></custom-block></script><comment x="583.6666666666663" y="981.9999999999992" w="401" collapsed="false">4. Write a test suite for element-wise sum.  Include at least four test cases.  Try to include test cases that would detect common programming errors.</comment><script x="583.6666666666663" y="1043.0000000000023"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test (element-wise sum of %l and %l ) = %l"><l/><l/><l/></custom-block><custom-block s="make test (element-wise sum of %l and %l ) = %l"><l/><l/><l/></custom-block><custom-block s="make test (element-wise sum of %l and %l ) = %l"><l/><l/><l/></custom-block><custom-block s="make test (element-wise sum of %l and %l ) = %l"><l/><l/><l/></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><comment x="30.666666666666657" y="10.000000000000014" w="402" collapsed="false">Part 1: Summarizing Numbers</comment><script x="35.66666666666666" y="683.9999999999974"><custom-block s="run test suite %l"><custom-block s="make test suite %mult%l"><list><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>1</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>-1</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>-1</l><l>1</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>1</l><l>-1</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>-1</l><l>2</l><l>3</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>1</l><l>-2</l><l>3</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>2</l><l>1</l><l>-2</l></list></block><l><bool>true</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>8</l><l>10</l><l>5</l><l>5</l><l>8</l><l>4</l><l>3</l><l>6</l></list></block><l><bool>false</bool></l></custom-block><custom-block s="make test &lt; %l includes negative?&gt; = %b"><block s="reportNewList"><list><l>8</l><l>10</l><l>5</l><l>5</l><l>-8</l><l>4</l><l>3</l><l>6</l></list></block><l><bool>true</bool></l></custom-block></list></custom-block></custom-block><block s="doReport"><l>Tests pass</l></block></script><script x="29.666666666666657" y="125.00000000000003"><custom-block s="sum of %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><comment x="184.71744791666652" y="122.00000000000009" w="90" collapsed="true">Implement Me</comment></scripts></sprite><watcher var="index" style="normal" x="10" y="10" color="243,118,29"/><watcher var="average" style="normal" x="10" y="31.000001999999995" color="243,118,29"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="sum of %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="264" collapsed="true">Takes a list as argument and reports the sum of all the numbers in the list.&#xD;&#xD;All items in the argument list must be numbers.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>sum</l></list></block><block s="doSetVar"><l>index</l><l>0</l></block><block s="doSetVar"><l>sum</l><l>0</l></block><block s="doRepeat"><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doChangeVar"><l>index</l><l>1</l></block><block s="doChangeVar"><l>sum</l><block s="reportListItem"><block var="index"/><block var="list"/></block></block></script></block><block s="doReport"><block var="sum"/></block></script></block-definition><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="let %upvar be %s"><l>reset</l><block s="evaluate"><block s="reportJSFunction"><list><l>proc</l></list><l>var oldHandleError = proc.handleError,&#xD;    oldCatchingErrors = proc.isCatchingErrors;&#xD;&#xD;return function(){&#xD; proc.handleError = oldHandleError;&#xD; proc.isCatchingErrors = oldCatchingErrors;&#xD;}</l></block><list></list></block></custom-block><block s="doCallCC"><block s="reifyScript"><script><block s="doRun"><block s="reportJSFunction"><list><l>reset</l><l>action</l><l>handler</l><l>proc</l></list><l>proc.isCatchingErrors = true;&#xD;proc.handleError = function(error, element){&#xD; reset();&#xD; proc.context = handler;&#xD; proc.context.variables.setVar("error", error);&#xD;}&#xD;&#xD;try{&#xD; proc.evaluate(action, new List(), true);&#xD;}&#xD;catch(e){&#xD; proc.handleError(e, null);&#xD;} </l></block><list><block var="reset"/><block var="action"/><block s="reifyScript"><script><block s="doRun"><block s="reifyScript"><script><block s="doRun"><block var="handler"/><list></list></block><block s="doRun"><block var="return"/><list></list></block></script><list></list></block><list></list></block></script><list></list></block></list></block></script><list><l>return</l></list></block></block><block s="doRun"><block var="reset"/><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg);</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;val&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="val"/></block></script></block-definition><block-definition s="run test suite %&apos;suite&apos;" type="command" category="other"><comment x="0" y="0" w="262" collapsed="false">Runs the tests in the given suite and throws an error if any fail.&#xD;&#xD;If the this block finished without error, then all tests passed.&#xD;&#xD;Use (make test suite ...) to build a test quite.&#xD;&#xD;Enables strict list bounds checking before running.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="set strict lists %b"><l><bool>true</bool></l></custom-block><custom-block s="let %upvar be %s"><l>index</l><l>1</l></custom-block><block s="doRepeat"><block s="reportListAttribute"><l><option>length</option></l><block var="suite"/></block><script><custom-block s="run test %l"><block s="reportListItem"><block var="index"/><block var="suite"/></block></custom-block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block></script></block-definition><block-definition s="run test %&apos;test&apos;" type="command" category="other"><comment x="0" y="0" w="243" collapsed="false">Run a single test.&#xD;&#xD;If this block completes without error, then the test passed, otherwise this block will throw an error that includes:&#xD;- a description of the test&#xD;- the expected result&#xD;- the actual result&#xD;&#xD;Use (make test ...) to create a test.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="unpack test %l $arrowRight %upvar %upvar %upvar"><block var="test"/><l>expr</l><l>expected</l><l>desc</l></custom-block><block s="doDeclareVariables"><list><l>result</l></list></block><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doSetVar"><l>result</l><block s="evaluate"><block var="expr"/><list></list></block></block></script><l>error</l><script><block s="doSetVar"><l>result</l><block var="error"/></block></script></custom-block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="result"/><block var="expected"/></block></block><script><block s="doIf"><block s="reportIsA"><block var="expected"/><l><option>list</option></l></block><script><block s="doSetVar"><l>expected</l><custom-block s="list %l $arrowRight text"><block var="expected"/></custom-block></block></script></block><block s="doIf"><block s="reportIsA"><block var="result"/><l><option>list</option></l></block><script><block s="doSetVar"><l>result</l><custom-block s="list %l $arrowRight text"><block var="result"/></custom-block></block></script></block><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Test case </l><block var="desc"/><l> expected </l><block var="expected"/><l> but got </l><block var="result"/></list></block></custom-block></script></block></script></block-definition><block-definition s="make test expr: %&apos;expr&apos; expected: %&apos;expected&apos; description: %&apos;desc&apos;" type="reporter" category="other"><comment x="0" y="0" w="330" collapsed="false">Create a test.&#xD;&#xD;expr - an unevaluated expression to be evaluated when the test is run&#xD;&#xD;expected - the expected result of evaluating expr&#xD;&#xD;description - a text string to identify the test</comment><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input><input type="%s"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><l>test-case</l><block var="expr"/><block var="expected"/><block var="desc"/></list></block></block></script></block-definition><block-definition s="make test suite %&apos;tests&apos;" type="reporter" category="other"><comment x="0" y="0" w="310" collapsed="false">Create a test suite from one or more tests.&#xD;&#xD;Use (make test ...) to create tests.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doReport"><block var="tests"/></block></script></block-definition><block-definition s="test case? %&apos;obj&apos;" type="predicate" category="other"><comment x="0" y="0" w="243" collapsed="true">Check if the given object is a test case.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportAnd"><block s="reportIsA"><block var="obj"/><l><option>list</option></l></block><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="obj"/></block><l>test-case</l></block></block></block></script></block-definition><block-definition s="unpack test %&apos;test&apos; $arrowRight %&apos;expr&apos; %&apos;expected&apos; %&apos;desc&apos;" type="command" category="other"><comment x="0" y="0" w="256" collapsed="false">Populate the given variables with the contents of the given test case.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%upvar"></input><input type="%upvar"></input><input type="%upvar"></input></inputs><script><block s="doIf"><block s="reportNot"><custom-block s="test case? %s"><block var="test"/></custom-block></block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>expected a test case, but got </l><block var="test"/></list></block></custom-block></script></block><block s="doSetVar"><l>expr</l><block s="reportListItem"><l>2</l><block var="test"/></block></block><block s="doSetVar"><l>expected</l><block s="reportListItem"><l>3</l><block var="test"/></block></block><block s="doSetVar"><l>desc</l><block s="reportListItem"><l>4</l><block var="test"/></block></block></script></block-definition><block-definition s="make test (sum of %&apos;list&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="sum of %l"><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(sum of </l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="list %&apos;list&apos; $arrowRight text" type="reporter" category="lists"><comment x="0" y="0" w="312" collapsed="false">Convert a list (of numbers) to a text string of the form (list 1 2 ...)</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><list><l>(list </l><custom-block s="join %l with %txt"><block var="list"/><l> </l></custom-block><l>)</l></list></block></block></script></block-definition><block-definition s="join %&apos;list&apos; with %&apos;delimiter&apos;" type="reporter" category="lists"><comment x="0" y="0" w="187" collapsed="false">Convert a list to a text string with each item separated by the given delimiter.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block var="list"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><l></l></block></script><script><block s="doIfElse"><block s="reportEquals"><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><l>1</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="list"/></block></block></script><script><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="list"/></block><block var="delimiter"/><custom-block s="join %l with %txt"><block s="reportCDR"><block var="list"/></block><block var="delimiter"/></custom-block></list></block></block></script></block></script></block></script></block-definition><block-definition s="average of %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="257" collapsed="true">Takes a list as argument and reports the average of all the numbers in the list.&#xD;&#xD;All items in the argument list must be numbers.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>sum</l></list></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doSetVar"><l>sum</l><l>0</l></block><block s="doRepeat"><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doChangeVar"><l>sum</l><block s="reportListItem"><block var="index"/><block var="list"/></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doSetVar"><l>average</l><block s="reportQuotient"><block var="sum"/><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block></block></block><block s="doReport"><block var="average"/></block></script></block-definition><block-definition s="make test (average of %&apos;list&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="average of %l"><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(average of </l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="%&apos;list&apos; includes negative?" type="predicate" category="operators"><comment x="0" y="0" w="262" collapsed="false">Takes a list as argument and reports &#xD;  true if the list contains at least one negative number&#xD;  false if all the numbers are positive.&#xD;&#xD;All items in the argument list must be numbers.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test &lt; %&apos;list&apos; includes negative?&gt; = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%b"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="%l includes negative?"><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>&lt;</l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l> includes negative?&gt;</l></list></block></custom-block></block></script></block-definition><block-definition s="%&apos;list&apos; is increasing?" type="predicate" category="operators"><comment x="0" y="0" w="306" collapsed="false">Takes a list of numbers as argument and reports:&#xD;  true if each value in the list is greater than the one before it&#xD;  false otherwise.&#xD;&#xD;All items in the list must be numbers.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test &lt; %&apos;list&apos; is increasing?&gt; = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%b"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="%l is increasing?"><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>&lt;</l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l> is increasing?&gt;</l></list></block></custom-block></block></script></block-definition><block-definition s="maximum of %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="311" collapsed="false">Takes a list as an argument and reports the largest number in the list.&#xD;&#xD;All items in the argument list must be numbers.&#xD;There must be at least one number in the list.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test (maximum of %&apos;list&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="maximum of %l"><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(maximum of </l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="absolute value of %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="340.0000010000001" collapsed="false">Takes a list of numbers as an argument and reports a **NEW** list that is the same as the argument, except that all negative numbers have been replaced with their absolute value.&#xD;&#xD;All items in the list must be numbers.&#xD;&#xD;Does NOT modify the argument list.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test (absolute value of %&apos;list&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="not-modified helper func: %repRing list: %l"><block s="reifyReporter"><autolambda><custom-block s="absolute value of %l"><l/></custom-block></autolambda><list></list></block><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(absolute value of </l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="not-modified helper func: %&apos;func&apos; list: %&apos;list&apos;" type="reporter" category="other"><comment x="0" y="0" w="252.99999999999997" collapsed="false">Reports the result of calling the 1-argument reporter &quot;func&quot; on a copy of the given list.&#xD;&#xD;Throws an error if func modifies the copy of the list.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><custom-block s="let %upvar be %s"><l>copy</l><block s="reportNewList"><list></list></block></custom-block><custom-block s="let %upvar be %s"><l>index</l><l>1</l></custom-block><block s="doRepeat"><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doAddToList"><block s="reportListItem"><block var="index"/><block var="list"/></block><block var="copy"/></block><block s="doChangeVar"><l>index</l><l>1</l></block></script><comment w="197" collapsed="false">Copy can be implemented more compactly with (map (lambda (x) x) list), but I don&apos;t want to pull (map ...) into the project.</comment></block><custom-block s="let %upvar be %s"><l>result</l><block s="evaluate"><block var="func"/><list><block var="copy"/></list></block></custom-block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="copy"/><block var="list"/><comment w="209" collapsed="false">So glad = is overloaded for lists.</comment></block></block><script><custom-block s="error %txt"><l>argument list was modified</l></custom-block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="only evens of %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="294" collapsed="false">Takes a list of integers as an argument and reports a **NEW** list that contains only the even numbers from the argument list.&#xD;&#xD;The result list has its values in the same order as the original list.&#xD;&#xD;All items in the argument list must be integers.&#xD;&#xD;Does NOT modify the argument list. </comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test (only evens of %&apos;list&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="not-modified helper func: %repRing list: %l"><block s="reifyReporter"><autolambda><custom-block s="only evens of %l"><l/></custom-block></autolambda><list></list></block><block var="list"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(only evens of </l><custom-block s="list %l $arrowRight text"><block var="list"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="element-wise sum of %&apos;left list&apos; and %&apos;right list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="372" collapsed="false">Takes two lists of numbers as arguments and reports their element-size sum.&#xD;&#xD;For example: &#xD;  If the arguments were: (1 4 6) and (2 2 3)&#xD;  The result would be (1+2 4+2 6+3) = (3 6 9)&#xD;&#xD;All items in the lists must be numbers, and they must both be the same length.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><l>Not implemented</l></block></script></block-definition><block-definition s="make test (element-wise sum of %&apos;left&apos; and %&apos;right&apos; ) = %&apos;expected&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="make test expr: %anyUE expected: %s description: %txt"><custom-block s="element-wise sum of %l and %l"><block var="left"/><block var="right"/></custom-block><block var="expected"/><block s="reportJoinWords"><list><l>(element-wise sum of </l><custom-block s="list %l $arrowRight text"><block var="left"/></custom-block><l> and </l><custom-block s="list %l $arrowRight text"><block var="right"/></custom-block><l>)</l></list></block></custom-block></block></script></block-definition><block-definition s="set strict lists %&apos;value&apos;" type="command" category="lists"><comment x="0" y="0" w="324" collapsed="true">Enable (or disable) strict bounds checking on list operations.</comment><header></header><code></code><translations></translations><inputs><input type="%b"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>value</l></list><l>if (value) {&#xD;  if (!Process.prototype.reportListItem_orig) Process.prototype.reportListItem_orig = Process.prototype.reportListItem;&#xD;  if (!Process.prototype.doDeleteFromList_orig) Process.prototype.doDeleteFromList_orig = Process.prototype.doDeleteFromList;&#xD;  if (!Process.prototype.doInsertInList_orig) Process.prototype.doInsertInList_orig = Process.prototype.doInsertInList;&#xD;  if (!Process.prototype.doReplaceInList_orig) Process.prototype.doReplaceInList_orig = Process.prototype.doReplaceInList;&#xD;&#xD;  Process.prototype.reportListItem = function (index, list) {&#xD;&#xD;    var idx = index;&#xD;&#xD;    // this.assertType(list, &apos;list&apos;);&#xD;&#xD;    if (index === &apos;&apos;) {&#xD;&#xD;        return &apos;&apos;;&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;any&apos;) {&#xD;&#xD;        idx = this.reportRandom(1, list.length());&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;last&apos;) {&#xD;&#xD;        idx = list.length();&#xD;&#xD;    }&#xD;&#xD;    if (index &lt; 1) throw new Error("&apos;item&apos; expected a positive list index, but got "+index);&#xD;&#xD;    if (index &gt; list.length()) throw new Error("&apos;item&apos; expected a list index less than "+(list.length()+1)+", but got "+index);&#xD;&#xD;    return list.at(idx);&#xD;&#xD;  };&#xD;  Process.prototype.doDeleteFromList = function (index, list) {&#xD;&#xD;    var idx = index;&#xD;&#xD;    // this.assertType(list, &apos;list&apos;);&#xD;&#xD;    if (this.inputOption(index) === &apos;all&apos;) {&#xD;&#xD;        return list.clear();&#xD;&#xD;    }&#xD;&#xD;    if (index === &apos;&apos;) {&#xD;&#xD;        return null;&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;last&apos;) {&#xD;&#xD;        idx = list.length();&#xD;&#xD;    } else if (isNaN(+this.inputOption(index))) {&#xD;&#xD;        return null;&#xD;&#xD;    }&#xD;&#xD;    if (index &lt; 1) throw new Error("&apos;delete&apos; expected a positive list index, but got "+index);&#xD;&#xD;    if (index &gt; list.length()) throw new Error("&apos;delete&apos; expected a list index less than "+(list.length()+1)+", but got "+index);&#xD;&#xD;    list.remove(idx);&#xD;&#xD;  };&#xD;&#xD;  Process.prototype.doInsertInList = function (element, index, list) {&#xD;&#xD;    var idx = index;&#xD;&#xD;    // this.assertType(list, &apos;list&apos;);&#xD;&#xD;    if (index === &apos;&apos;) {&#xD;&#xD;        return null;&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;any&apos;) {&#xD;&#xD;        idx = this.reportRandom(1, list.length() + 1);&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;last&apos;) {&#xD;&#xD;        idx = list.length() + 1;&#xD;&#xD;    }&#xD;&#xD;    if (index &lt; 1) throw new Error("&apos;add&apos; expected a positive list index, but got "+index);&#xD;&#xD;    if (index &gt; list.length()+1) throw new Error("&apos;add&apos; expected a list index less than "+(list.length()+2)+", but got "+index);&#xD;&#xD;    list.add(element, idx);&#xD;&#xD;  };&#xD;  Process.prototype.doReplaceInList = function (index, list, element) {&#xD;&#xD;    var idx = index;&#xD;&#xD;    // this.assertType(list, &apos;list&apos;);&#xD;&#xD;    if (index === &apos;&apos;) {&#xD;&#xD;        return null;&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;any&apos;) {&#xD;&#xD;        idx = this.reportRandom(1, list.length());&#xD;&#xD;    }&#xD;&#xD;    if (this.inputOption(index) === &apos;last&apos;) {&#xD;&#xD;        idx = list.length();&#xD;&#xD;    }&#xD;&#xD;    if (index &lt; 1) throw new Error("&apos;replace&apos; expected a positive list index, but got "+index);&#xD;&#xD;    if (index &gt; list.length()) throw new Error("&apos;replace&apos; expected a list index less than "+(list.length()+1)+", but got "+index);&#xD;&#xD;    list.put(element, idx);&#xD;&#xD;  };&#xD;}&#xD;else {&#xD;  if (Process.prototype.reportListItem_orig) Process.prototype.reportListItem = Process.prototype.reportListItem_orig;&#xD;&#xD;  if (Process.prototype.doDeleteFromList_orig) Process.prototype.doDeleteFromList = Process.prototype.doDeleteFromList_orig;&#xD;&#xD;  if (Process.prototype.doInsertInList_orig) Process.prototype.doInsertInList = Process.prototype.doInsertInList_orig;&#xD;&#xD;  if (Process.prototype.doReplaceInList_orig) Process.prototype.doReplaceInList = Process.prototype.doReplaceInList_orig;&#xD;&#xD;}</l></block><list><block var="value"/></list></block></script></block-definition></blocks><variables><variable name="index"><l>0</l></variable><variable name="average"><l>5.75</l></variable></variables></project><media name="4.4 NumberCruncher starter code" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>