On Jun 29, 2012, at 5:52 PM, Stephen Bloch wrote: > Another thing I recommend: every time you write a define-struct, write down > (in comments) the contracts for all the functions it gives you for free. > > For example, > ; a person has a forename and a family-name (both strings), and a birth-year > (a number). > (define-struct person forename family-name birth-year) > ; make-person : string string number -> person > ; person-forename : person -> string > ; person-family-name : person -> string > ; person-birth-year : person -> number > ; person? : anything -> boolean
He tried so let me propose a slightly different format: make-person ; string string number -> person person-forename ; person -> string ^ | +------ please do notice the semicolon here; the rest of these lines are comments This will ensure he gets the names right. ____________________ Racket Users list: http://lists.racket-lang.org/users