Hi Brian

r >= 0 && r <= 4 && c >= 0 && c <= r


implies

0 <= c <= r <= 4


Or  using prefix and the variable-arity of <=:

(define (is-pos r c)
  (<= 0 c r 4))


which I think works well for clarity, concision, and efficiency.

Dan
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to