> On Mar 2, 2018, at 1:30 PM, A Mauer-Oats <mauero...@gmail.com> wrote:
> The Racket Guide (7.2.2 Using define/contract and ->) says, "contract will 
> always be checked on calls to deposit.”

This is bad English. It should say “all external calls.” 

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

ISL and up comes with assertions that are checked on all calls. You may wish to 
use those. 

> 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")]
>         [else
>          10]))
> ; 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 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to