From cbdfdabe7af378c9732721d5db23fcb311c603a6 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Tue, 3 Mar 2020 01:01:21 +0100 Subject: [PATCH] example: Illustrate building interactive processes. --- example/example.org | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/example/example.org b/example/example.org index ae6f2cd..836154d 100644 --- a/example/example.org +++ b/example/example.org @@ -579,6 +579,34 @@ tab each state to avoid confusion between the states at different steps of the evolution. + The graphical presentation for interactive processes is arguably + less readable than just listing the contexts and the results + explicitly. Here is how you can do it. + + #+NAME: rs1-ip + #+HEADER: :var input-rs=munch-sexp(rs1) :var input-ctx=munch-sexp(ctx1) + #+BEGIN_SRC racket :results table drawer +(build-interactive-process (unorg-rs input-rs) (read-ctx input-ctx)) + #+END_SRC + + #+RESULTS: rs1-ip + :RESULTS: + | (y x) | nil | + | (z) | (z) | + | nil | nil | + | (t) | nil | + | nil | nil | + :END: + + The first column of this table shows the current context. The + second column shows the result of application of the reactions to + the previous state. The interactive process contains one more step + with respect to the context sequence. This is to show the effect + of the last context. + + Note that empty sets are printed as =nil=. + + * Local Variables :noexport: # Local Variables: # eval: (auto-fill-mode)