The Racket Guide (7.2.2 Using define/contract and ->) says, "contract will 
always be checked on calls to deposit."

It appears that recursive function calls are not included in that 
I wish they were, for teaching beginners.

Let me know if there is any (simple) way to do this. 

(require racket/contract)
(define/contract (f n)
  (-> number? number?)
  (cond [(number? n)
         (f "bad")]

; I wish this would signal contract violation, but it gives the answer 10
(f 5)

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to