Using DrRacket v5.3.6, if I enter: (define (tax pay) (cond ((<= pay 240.0) 0) ((<= pay 480.0) (* (/ 15 100) pay)) ((else ((+ (* (/ 15 100) 480) (* (/ 28 100) (- pay 480))))))))
I get error else: not allowed as an expression in: (else ((+ (* (/ 15 100) 480) (* (/ 28 100) (- pay 480))))) Can you not have an expression in an else clause? Can an else only contain a simple value? What am I doing wrong? This is HTDP ex 4.4.2 by the way.
____________________ Racket Users list: http://lists.racket-lang.org/users