typed/racunit:
- fix more contracts - make test tests not fail original commit: 3ebd04550a14e52ed1ce44abe2c1d9f4b7c3374a
This commit is contained in:
parent
9e9ee0aee4
commit
c1415c98c2
|
@ -10,7 +10,7 @@
|
|||
|
||||
(: my-* : Integer Integer -> Integer)
|
||||
(define (my-* a b)
|
||||
(if (zero? a)
|
||||
(if (= a 1)
|
||||
b
|
||||
(my-* (sub1 a) (my-+ b b))))
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
(case-lambda
|
||||
(Any Any -> Void)
|
||||
(Any Any String -> Void)))
|
||||
(define-type (Predicate A) (Any -> Boolean))
|
||||
(define-type (Thunk A) (-> Any))
|
||||
(define-type (Predicate A) (A -> Boolean))
|
||||
(define-type (Thunk A) (-> A))
|
||||
|
||||
; 3.2
|
||||
(require/typed/provide
|
||||
|
@ -43,15 +43,13 @@
|
|||
(Any -> #t)
|
||||
(Any String -> #t))]
|
||||
[check-exn
|
||||
(All (A B)
|
||||
(case-lambda
|
||||
((Predicate A) (Thunk B) -> #t)
|
||||
((Predicate A) (Thunk B) String -> #t)))]
|
||||
(case-lambda
|
||||
((Predicate Any) (Thunk Any) -> #t)
|
||||
((Predicate Any) (Thunk Any) String -> #t))]
|
||||
[check-not-exn
|
||||
(All (A)
|
||||
(case-lambda
|
||||
((Thunk A) -> #t)
|
||||
((Thunk A) String -> #t)))]
|
||||
(case-lambda
|
||||
((Thunk Any) -> #t)
|
||||
((Thunk Any) String -> #t))]
|
||||
[fail
|
||||
(case-lambda
|
||||
(-> #t)
|
||||
|
|
Loading…
Reference in New Issue
Block a user