Hers is what Sam means with an example: 

#lang racket

(module+ test
  (require rackunit))

;; --- in file 
(module server racket
  (provide
   (contract-out
    (f (-> integer? integer?))))

  (define (f x)
    (if (= x 1) "hello world" x)))

;; --- in text client 
(require 'server)

(module+ test
  (check-exn exn:fail:contract? (lambda () (f 1)))
  (check-exn exn:fail:contract? (lambda () (f 2))))




> On Nov 18, 2017, at 8:09 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote:
> 
> The second argument to check-exn needs to be a thunk.
> 
> Sam
> 
> On Nov 18, 2017 7:32 AM, "Tim Hanson" <tbh...@gmail.com 
> <mailto:tbh...@gmail.com>> wrote:
> Hi, I guess this didn't find the right subject matter expert yet. Would it be 
> better to ask a specific person or use a different channel?
> Cheers, tbh
> 
> --
> 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 
> <mailto:racket-users%2bunsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> 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 
> <mailto:racket-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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