From 3dee3163f06a52eef7998870740093f656c5384e Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sat, 11 Jul 2020 00:53:15 +0200 Subject: [PATCH] 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. --- functions.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.rkt b/functions.rkt index 8dbfb74..d382f42 100644 --- a/functions.rkt +++ b/functions.rkt @@ -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))))]