;;; Procedure: ;;; compound-field-index ;;; Parameters: ;;; field, a symbol ;;; Purpose: ;;; Given the name of a field, determine its index in the ;;; vector. ;;; Produces: ;;; index, an integer ;;; Preconditions: ;;; field must be one of 'boiling-point, 'color, 'formula, 'melting-point ;;; 'molecular-weight, or 'name. [Unverified] ;;; Postconditions: ;;; index is the index associated with field. (define compound-field-index (let ((name 1) (formula 2) (molecular-weight 3) (melting-point 4) (boiling-point 5) (color 6)) (lambda (field) (eval field))))