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:
Sergiu Ivanov 2020-07-11 00:53:15 +02:00
parent 47532e3905
commit 3dee3163f0

View File

@ -15,8 +15,8 @@
[struct tbf ((weights (vectorof number?)) (threshold number?))])
;; Functions
(contract-out
[tabulate (-> procedure-fixed-arity? (listof generic-set?) (listof list?))]
[tabulate* (-> (listof procedure-fixed-arity?) (listof generic-set?) (listof list?))]
[tabulate (-> procedure? (listof generic-set?) (listof list?))]
[tabulate* (-> (listof procedure?) (listof generic-set?) (listof list?))]
[tabulate/boolean (-> 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))))]