(define/contract (foo x)
  (-> boolean? any)

(foo #t)
(foo 7)
; foo: contract violation
;   expected: boolean?
;   given: 7
;   in: the 1st argument of
;       (-> boolean? any)
;   contract from: (function foo)
;   blaming: top-level
;    (assuming the contract is correct)
;   at: readline-input:4.18
; [,bt for context]

Yup, all good.

(define/contract foo (make-parameter #f) boolean?)
(foo #t)
(foo 7)

This isn't what I expected.  What am I missing?

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.
To view this discussion on the web visit 

Reply via email to