functions, tabulate*: Add a test for an empty list of functions.

This commit is contained in:
Sergiu Ivanov 2020-05-31 22:50:35 +02:00
parent ece53ea522
commit 26c615e6cf
1 changed files with 5 additions and 3 deletions

View File

@ -52,9 +52,11 @@
(module+ test
(test-case "tabulate*"
(check-equal? (tabulate* (list (λ (x y) (and x y))
(λ (x y) (or x y)))
'((#f #t) (#f #t)))
'((#f #f #f #f) (#f #t #f #t) (#t #f #f #t) (#t #t #t #t)))))
(λ (x y) (or x y)))
'((#f #t) (#f #t)))
'((#f #f #f #f) (#f #t #f #t) (#t #f #f #t) (#t #t #t #t)))
(check-equal? (tabulate* empty '((#f #t) (#f #t)))
'((#f #f) (#f #t) (#t #f) (#t #t)))))
;;; Like tabulate, but assumes the domains of all variables of the
;;; function are Boolean. func must have a fixed arity. It is an