Every time I run this code, I get an error message: "Define: Only one for the function body Expectation is expected, but 1 additional part was found. "I have tried repeatedly to fix this, but I have not got the solution. Does anyone know how I can fix this? Sorry for the long code, I thought I should include it or not understand it Thanks!
(set metric ton (see-scene 50 50)); A polygon is one of these:; - (Paus Pausanne Pausan); - (Opposition Poisson Polygon); One NELoP is one of these:; - (Opposition is Pous Down); - (Opposition Poissell Nellop); Polygon - & gt; Image; Paint a picture of a P (metric tonne (polygon - polygon P) (removes the last item from local [[polygon -> pinan; p (define (last p) (cond ([(empty? The rest of the rest (the rest)) ()) [] (third (P)] [and (final (rest P))]) [; Image Posn Posn -> Image (define line IM PAC) Line im (posn-x p) (posn-x q) (posn-q q) "red")) []; [nellop -> image; connects pns to an image (defined) (Connect-Dots P) ((Otherwise) () ())))) () Assign New code (still not working):
Code>; Polygon - & gt; Image; Paint a picture of a P (metric tonne (polygon - polygon P) (removes the last item from local [[polygon -> pinan; p (define (last p) (cond ([(empty? Image (define (render line im pac) (ad-line im (posn- X p) (posn-x p) (posn-x q) (posn-y q) "red"); nellop -> image; adds an image to pns (define (connect-dots p) (Cond [(empty (second p)))) (render-line (connect-dr) (P) P) (first p) (first p) (remaining) mt] [and (render-line (connect-dots (rest p)) (first p) last p))))
<
Your render-line
expression inside local < / Code> form, after which not all, all your
defined
s one should have subform in local
, each own subform Otherwise, it should look like:
(local [(defined) (Last P) ...) (Define (Render-Line IM Peak) ... (Define (Connect-Dots P) ...)] (Render-Line ...))
No comments:
Post a Comment