diff --git a/example/example.org b/example/example.org index 71f3bed..8f78e15 100644 --- a/example/example.org +++ b/example/example.org @@ -766,6 +766,33 @@ tab inputs. The third column gives the values of the first TBF, and the fourth column gives the values of the second TBF. + =dds= also provides a couple shortcuts to deal with SBF—sign + Boolean functions. SBF are TBF with threshold equal to 0: + #+BEGIN_SRC racket :results output drawer +(sbf? (tbf #(1 1) 1)) +(sbf? (tbf #(1 1) 0)) + #+END_SRC + + #+RESULTS: + :RESULTS: + #f + #t + :END: + + You can read SBFs from Org tables, like TBFs: + #+NAME: some-sbfs + | 1 | -1 | + | 2 | 2 | + + #+BEGIN_SRC racket :results output drawer :var some-sbfs=munch-sexp(some-sbfs) +(read-org-sbfs some-sbfs) + #+END_SRC + + #+RESULTS: + :RESULTS: + (list (tbf '#(1 -1) 0) (tbf '#(2 2) 0)) + :END: + * Reaction systems :PROPERTIES: :header-args:racket: :prologue "#lang racket\n(require graph dds/rs dds/utils)"