From 1adaf63ec1ce90515ce72b37a3bbbe5af40bef44 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 12 Jul 2020 00:20:15 +0200 Subject: [PATCH] functions: Implement tbf-tabulate using tbf-tabulate*. --- functions.rkt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions.rkt b/functions.rkt index 3e9d125..6f97e03 100644 --- a/functions.rkt +++ b/functions.rkt @@ -342,12 +342,7 @@ '((0 0 0 0) (0 1 1 0) (1 0 1 0) (1 1 1 1))))) ;;; Tabulates a TBF. -(define (tbf-tabulate tbf) - (define ins (apply - cartesian-product - (make-list (vector-length (tbf-w tbf)) '(0 1)))) - (for/list ([in ins]) - (append in (list (apply-tbf tbf (list->vector in)))))) +(define tbf-tabulate (compose tbf-tabulate* list)) (module+ test (test-case "tbf-tabulate"