Rudy’s OBTF Rudolf Adamkovič

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


Test

<<scheme/org-truth-table>>
(unless
    (equal? (org-truth-table not '("P" "\\lnot P"))
            '(("\\(P\\)" "\\(\\lnot P\\)")
              ()
              ("/" "<")
              ("false" "true")
              ("true" "false")))
  (raise #f))
(unless
    (equal? (org-truth-table (lambda (p q) (and p q))
                             '("P" "Q" "P \\land Q"))
            '(("\\(P\\)" "\\(Q\\)" "\\(P \\land Q\\)")
              ()
              ("/" "" "<")
              ("false" "false" "false")
              ("false" "true" "false")
              ("true" "false" "false")
              ("true" "true" "true")))
  (raise #f))
"tests passed"
tests passed

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