Examples of cond


   (define (select-wine meat)
     (cond ((eqv? meat 'beef) 'red)
           ((or (eqv? meat 'fish)
                (eqv? meat 'chicken))
             'white)
           (else 'rose)))


   (define (what-to-wear temp rain)
     (cond ((and (< temp 40)
                 (not rain))
             'down-pants)
           ((or (< temp 80) rain) 'jeans)
           (else 'shorts)))

Contents    Page-10    Prev    Next    Page+10    Index