;;; ================================ ;;; CMPU-181, Spring 2013 ;;; Code from class (definitions) ;;; Feb. 4, 2013 ;;; ================================ ;;; SQUARE -- a squaring function ;;; ---------------------------------------- ;;; INPUT: X, a number ;;; OUTPUT: The square of X (i.e., X*X) (define square (lambda (x) (* x x))) ;;; FAHR->CELS ;;; ------------------------------------ ;;; INPUT: FAHR, temperature in degrees fahrenheit ;;; OUTPUT: The corresponding temperature in degrees celsius ;;; C = 5/9 * (F - 32) ;;; Examples: F = 32, C = 0 ;;; F = 212, C = 100 ;;; F = -40, C = -40 (define fahr->cels (lambda (fahr) (* 5/9 (- fahr 32))))