Add `Any' contract to HtDP languages.
This commit is contained in:
parent
bf409e6300
commit
98c9ad4d22
|
@ -62,7 +62,7 @@
|
||||||
empty true false
|
empty true false
|
||||||
|
|
||||||
signature : -> mixed one-of predicate combined
|
signature : -> mixed one-of predicate combined
|
||||||
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list
|
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
|
||||||
Property
|
Property
|
||||||
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
empty true false
|
empty true false
|
||||||
|
|
||||||
signature : -> mixed one-of predicate combined
|
signature : -> mixed one-of predicate combined
|
||||||
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list
|
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
|
||||||
Property
|
Property
|
||||||
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
empty true false
|
empty true false
|
||||||
|
|
||||||
signature : -> mixed one-of predicate combined
|
signature : -> mixed one-of predicate combined
|
||||||
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list
|
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
|
||||||
Property
|
Property
|
||||||
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
empty true false
|
empty true false
|
||||||
|
|
||||||
signature : -> mixed one-of predicate combined
|
signature : -> mixed one-of predicate combined
|
||||||
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list
|
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
|
||||||
Property
|
Property
|
||||||
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
empty true false
|
empty true false
|
||||||
|
|
||||||
signature : -> mixed one-of predicate combined
|
signature : -> mixed one-of predicate combined
|
||||||
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list
|
Number Real Rational Integer Natural Boolean True False String Symbol Char Empty-list Any
|
||||||
Property
|
Property
|
||||||
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
check-property for-all ==> expect expect-within expect-member-of expect-range)
|
||||||
|
|
||||||
|
|
|
@ -2881,7 +2881,7 @@
|
||||||
(provide Integer Number Rational Real Natural
|
(provide Integer Number Rational Real Natural
|
||||||
Boolean True False
|
Boolean True False
|
||||||
String Char Symbol Empty-list
|
String Char Symbol Empty-list
|
||||||
Unspecific)
|
Any Unspecific)
|
||||||
|
|
||||||
(define Integer (signature/arbitrary arbitrary-integer (predicate integer?)))
|
(define Integer (signature/arbitrary arbitrary-integer (predicate integer?)))
|
||||||
(define Number (signature/arbitrary arbitrary-real (predicate number?)))
|
(define Number (signature/arbitrary arbitrary-real (predicate number?)))
|
||||||
|
@ -2904,6 +2904,8 @@
|
||||||
(define Symbol (signature/arbitrary arbitrary-symbol (predicate symbol?)))
|
(define Symbol (signature/arbitrary arbitrary-symbol (predicate symbol?)))
|
||||||
(define Empty-list (signature (one-of empty)))
|
(define Empty-list (signature (one-of empty)))
|
||||||
|
|
||||||
|
(define Any (signature (predicate (lambda (_) #t))))
|
||||||
|
|
||||||
(define Unspecific (signature (predicate (lambda (_) #t))))
|
(define Unspecific (signature (predicate (lambda (_) #t))))
|
||||||
|
|
||||||
; QuickCheck
|
; QuickCheck
|
||||||
|
|
Loading…
Reference in New Issue
Block a user