Currently going through DrRacket's "draw.ss" teachpack.<div><br></div><div>There is a structure called "posn" defined in the following way.</div><div><br></div><div><b>(struct posn (x y))</b></div><div>
<b><br></b></div><div>Also a function that returns a posn defined as:</div><div><br></div><div><b>(define (make-posn x y)</b></div><div><b> (posn x y))</b></div><div><b><br></b></div><div>Using the draw-circle function defined in draw.ss, I wanted to draw a green circle centered at (posn 150 150), with radius 20.</div>
<div><b><br></b></div><div><div style="font-weight: bold; ">> (draw-circle (make-posn 150 150) 20 'green)</div><div style="font-weight: bold; ">. . draw-circle: expects a posn as first argument, given #<posn></div>
<div style="font-weight: bold; "><br></div><div>I don't understand the above error. Draw-circle expects a posn structure, and DrRacket recognized that I gave it one. So where did the error stem from?</div></div><div><br>
</div><div>Regards,</div><div>Chun How</div>