Below typed/racket program will produce 'flo

(define-type K (U Number Float))
(define n : K 1.2)
 
(cond
  [(flonum? n) 'flo]
  [(number? n) 'num])

but if I change the order of clauses?

(cond
  [(number? n) 'num]
  [(flonum? n) 'flo])

The result now is 'num. The problem is the type 𝐴𝐵 in this way rely on not tagged but type of value to distinguish it has 𝐴 or 𝐵 here.