Consider this itemization: Status is one of "closed" or an Integer from 1 through 10 inclusive. Write a template for a function that consumes a Status. Make sure the numeric test cannot accidentally be applied to the string case.
Short answerAccepted answer
#;
(define (fn-for-status s)
(cond [(and (string? s) (string=? s "closed")) (...)]
[(and (integer? s) (<= 1 s) (<= s 10)) (... s)]))
A simpler first branch such as (string=? s "closed") is also acceptable if it is guaranteed to be reached only for strings.