Re: [racket] cond and else together

2013-10-22 Thread Neil Van Dyke
You have an extra pair of parentheses around the "else" clause. Bo Gus wrote at 10/22/2013 04:08 AM: (define (tax pay) (cond ((<= pay 240.0) 0) ((<= pay 480.0) (* (/ 15 100) pay)) ((else ((+ (* (/ 15 100) 480) (* (/ 28 100) (- pay 480 Racket Users l

[racket] cond and else together

2013-10-22 Thread Bo Gus
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)