<div>Wrote this from the lesson:</div><div><br></div><div>;; this is the definitive exercise 32 from the 2htdp</div><div>;; car moves across the empty-screen.  Yay.  12/2/2010</div><div><br></div><div><br></div><div>;;  this creates the empty window</div>
<div><br></div><div>(define WIDTH 1000)</div><div>(define HEIGHT 40)</div><div>(define MTSCN (empty-scene WIDTH HEIGHT))</div><div><br></div><div>;; this draws the vehicle shape</div><div><br></div><div>(define WHEEL-RADIUS 5)</div>
<div>  (define WHEEL-DISTANCE (* WHEEL-RADIUS 5))</div><div>  (define BODY-LENGTH (+ WHEEL-DISTANCE (* 6 WHEEL-RADIUS)))</div><div>  (define BODY-HEIGHT (* WHEEL-RADIUS 2))  </div><div>   (define WHL (circle WHEEL-RADIUS &quot;solid&quot; &quot;black&quot;))</div>
<div>  (define BDY</div><div>    (above</div><div>      (rectangle (/ BODY-LENGTH 2) (/ BODY-HEIGHT 2)</div><div>                 &quot;solid&quot; &quot;blue&quot;)</div><div>      (rectangle BODY-LENGTH BODY-HEIGHT &quot;solid&quot; &quot;red&quot;)))</div>
<div>  (define SPC (rectangle WHEEL-DISTANCE 1 &quot;solid&quot; &quot;white&quot;))</div><div>  (define WH* (beside WHL SPC WHL))</div><div>  (define CAR (underlay/xy BDY WHEEL-RADIUS BODY-HEIGHT WH*))</div><div>  </div>
<div>  ;; As Ramin A. my old classmate once said, &quot;I drew a tree&quot;</div><div>  ;; Well, this is a tree I was instructed to place in the empty screen</div><div>  ;; as a constant shape throughout the running fo the program</div>
<div>  </div><div>  (define tree</div><div>    (underlay/xy (circle 10 &#39;solid &#39;green)</div><div>                 9 15</div><div>                 (rectangle 2 20 &#39;solid &#39;brown)))</div><div>;; this one actually places the tree!</div>
<div>  </div><div>   (define BACKGROUND</div><div>     (place-image tree 500 25 MTSCN)</div><div>     )</div><div>   </div><div>;; this sets the y-axis (vertical) for the car and</div><div>;; defines the &quot;tock&quot; where the trigger is the clock (not keystroke or mouse)</div>
<div>;; increments of 3</div><div>   </div><div>  (define Y-CAR 30)</div><div>  (define (tock ws) (+ ws 3))</div><div>  </div><div>;;  Here we are placing the car into the scene, according to the given world state</div><div>
<br></div><div>  (define (render ws) (place-image CAR ws Y-CAR BACKGROUND))</div><div> </div><div>  </div><div> </div><div>;;  here is the big-bang, or main program, that is the actual instruction </div><div>;; to use all the above-definitions</div>
<div>  </div><div>  (define (main ws)</div><div>    (big-bang ws (on-tick tock) (to-draw render) <b>(stop-when (&gt; ws 500)  )</b>))</div><div><br></div><div>;;  that&#39;s it!  </div><div>;;  next step is a condition that will stop the program when </div>
<div>;; the vehicle reaches a certain point</div><div><br></div><div>****************************</div><div>Ok, I bold-faced the attempt to have the car stop at x-axis of 500, which I believe is ws 500.  When I put in &quot;(main 1)&quot; in the execution line, I get a false boolean, if I put in &quot;(main 501)&quot; I get a true boolean.  Both cases, it doesn&#39;t work the &quot;procedure expects an argument&quot;, not a true/false.  </div>
<div><br></div><div>How the heck can I get the stop-when function to work, or can I be pointed to a section of the tutor or other reference that explains to me what should be a simple (not to me) additional command in the big-bang.  Thank you in advance,</div>
<div><br></div><div>dt</div><br>-- <br><br>CONFIDENTIAL EMAIL:  This email may contain - Attorney-Client Privileged - Attorney Work Product - This email is only for use by the intended recipient. If received in error any use, disclosure or copying is prohibited. Any inadvertent receipt shall not be a waiver of any privilege or work product protection. If you have received this communication in error, please notify sender immediately.  Thank you.<br>