[racket] ufo structure problem

From: Stephen Bloch (bloch at adelphi.edu)
Date: Mon Apr 2 09:12:51 EDT 2012

On Apr 2, 2012, at 7:29 AM, Roelof Wobben <r.wobben at home.nl> wrote:

> I like the way you do these things.
> but what did you mean with "p-x" ?

p-x doesn't exist, but it's a mistake my students often make:

(define p (make-posn 3 5))
...
p-x ; they expect 3, but get an error message instead.

> Following your way of working the answer is (posn-x p) and (posn-y p) because P is the struct which holds the position.

"The answer" to what?  It's true that (posn-x p) and (posn-y p) are both reasonable expressions to use; whether they're right answers depends on the question :-)
> 


Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.