Thanks again. I've tweaked and commented the end of Mathias's example:
(module+ test (check-exn exn:fail:contract? (lambda () (f 1))) ; violates contract by returning non-integer (check-exn exn:fail:contract? (lambda () (f 'a)))) ; violates contract by being called with a non-integer and "thunking" makes my example work as I wanted: (check-exn exn:fail:contract? (lambda () (stream-first (pairwise-stream (stream-cons 1 empty-stream))))) -- 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.