;;;; This example illustrates the use of the design recipe for ;;;; functions consuming simple (atomic) data. Steps 1 and 4 ;;;; aren't involved in this simple situation. ;; (Step 2) Contract/purpose/header ;; f2c : Number -> Number ;; converts temperature in degrees Fahrenheit to degrees Celsius ;; (define (f2c f) ... ) ;; (Step 5) Body (define (f2c f) (* 5/9 (- f 32))) ;; (Step 3) Examples and (Step 6) Tests (f2c 212) "should be" 100 (f2c 32) "should be" 0 ;; After the above function has been developed, we can use the ;; convert.ss teachpack (by selecting the Add Teachpack option ;; from DrScheme's Language menu) and connect it to a GUI ;; as follows: (convert-gui f2c)