[racket] exercise 6.6.3 htdp

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Nov 30 07:25:43 EST 2011

On Nov 30, 2011, at 7:11 AM, frank weytjens wrote:

> (define (in-circle? C pos)
>   (> (cirkel-number C) (distance-to-center C pos)))

If a math teacher asked you to determine whether a point was (strictly) within a circle, he'd write 

  |p - c| < r

Somewhere else he'd define 

                  ____________________________
 |p - c| = \/ (p.x - c.x)^2 + (p.y - c.y)^2

and somewhere else he'd define 

 foo.x extracts the x component from a Cartesian point foo

You wrote exactly the same though with bad choices for the names and with a bad ordering of material.

What part are you unhappy about? 

-- Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111130/fe41a6ff/attachment.html>

Posted on the users mailing list.