Rudy’s OBTF Rudolf Adamkovič

Home / Logic / Truth table / Implementation / Function scheme/truth-table


Implement

Builds on scheme/boolean-product.

<<scheme/boolean-product>>
(define (truth-table procedure arity)
  "Return a truth table for PROCEDURE with ARITY."
  (map (lambda (inputs)
         (append inputs (list (apply procedure inputs))))
       (boolean-product arity)))

© 2025 Rudolf Adamkovič under GNU General Public License (GPL) version 3 or later.
Made with Emacs and secret alien technologies of yesteryear.