Generalise the contracts of tabulate and tabulate*.
The new contracts do not require the procedures to have fixed arity. I don't actually need the fixed arity in tabulate and tabulate*, because these functions know the number of inputs from the length of the list of the domains.
This commit is contained in:
parent
47532e3905
commit
3dee3163f0
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@
|
||||||
[struct tbf ((weights (vectorof number?)) (threshold number?))])
|
[struct tbf ((weights (vectorof number?)) (threshold number?))])
|
||||||
;; Functions
|
;; Functions
|
||||||
(contract-out
|
(contract-out
|
||||||
[tabulate (-> procedure-fixed-arity? (listof generic-set?) (listof list?))]
|
[tabulate (-> procedure? (listof generic-set?) (listof list?))]
|
||||||
[tabulate* (-> (listof procedure-fixed-arity?) (listof generic-set?) (listof list?))]
|
[tabulate* (-> (listof procedure?) (listof generic-set?) (listof list?))]
|
||||||
[tabulate/boolean (-> procedure-fixed-arity? (listof (listof boolean?)))]
|
[tabulate/boolean (-> procedure-fixed-arity? (listof (listof boolean?)))]
|
||||||
[tabulate*/boolean (-> (non-empty-listof procedure-fixed-arity?) (listof (listof boolean?)))]
|
[tabulate*/boolean (-> (non-empty-listof procedure-fixed-arity?) (listof (listof boolean?)))]
|
||||||
[tabulate/01 (-> procedure? (listof (listof (or/c 0 1))))]
|
[tabulate/01 (-> procedure? (listof (listof (or/c 0 1))))]
|
||||||
|
|
Loading…
Reference in a new issue