example: Illustrate tabulate*/boolean.

This commit is contained in:
Sergiu Ivanov 2020-05-31 23:42:16 +02:00
parent 45b7604c51
commit e654123a39

View file

@ -525,6 +525,20 @@ tab
| #t | #t | #t |
:END:
You can tabulate multiple functions taking the same arguments over
the same domains together.
#+BEGIN_SRC racket :results table drawer
(tabulate*/boolean `(,(λ (x y) (and x y)) ,(λ (x y) (or x y))))
#+END_SRC
#+RESULTS:
:RESULTS:
| #f | #f | #f | #f |
| #f | #t | #f | #t |
| #t | #f | #f | #t |
| #t | #t | #t | #t |
:END:
Here's how to tabulate the network =simple-bn=, defined at the top
of this section:
#+BEGIN_SRC racket :results table drawer :var in-bn=munch-sexp(simple-bn)