[racket] structures question

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Thu Mar 29 11:27:50 EDT 2012

On Thu, Mar 29, 2012 at 11:15 AM, Roelof Wobben <r.wobben at home.nl> wrote:
> Op 29-3-2012 16:37, David Van Horn schreef:
>> ;; Posn -> Number.
>> ;; A programm for calculating the distance is Manhatten
>> (check-expect (manhatten (make-posn 7 3 )) 10)
>> (check-expect (manhatten (make-posn 1 1 )) 2)
>> (define (manhatten pos-manhatten)
>>  (+ (posn-y pos-manhatten) (posn-x pos-manhatten)))

One trick I use to let the DrRacket editor help me out is use newlines
and its knowledge of indentation.

If you put a newline after the first argument to manhatten, the
DrRacket editor will have the second argument line up right below the

If the indentation that the editor uses doesn't match my expectations,
then I know something strange has happened.

Posted on the users mailing list.