rs: Remove macros, update example.
This commit is contained in:
parent
4c6f3af2a9
commit
14688a9bae
|
@ -589,7 +589,7 @@ tab
|
|||
Here is how we read this reaction into Racket code:
|
||||
|
||||
#+BEGIN_SRC racket :results output drawer :var input-rs=munch-sexp(rs1)
|
||||
(unorg-rs input-rs)
|
||||
(read-org-rs input-rs)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -599,7 +599,7 @@ tab
|
|||
|
||||
Here is how we can put it back into an Org-mode table:
|
||||
#+BEGIN_SRC racket :results table drawer :var input-rs=munch-sexp(rs1)
|
||||
(org-rs (unorg-rs input-rs))
|
||||
(rs->ht-str-triples (read-org-rs input-rs))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -610,7 +610,7 @@ tab
|
|||
|
||||
Here is how we can apply this reaction system to a state:
|
||||
#+BEGIN_SRC racket :results output drawer :var input-rs=munch-sexp(rs1)
|
||||
(let ([rs (unorg-rs input-rs)])
|
||||
(let ([rs (read-org-rs input-rs)])
|
||||
(apply-rs rs (set 'x 't)))
|
||||
#+END_SRC
|
||||
|
||||
|
@ -621,7 +621,7 @@ tab
|
|||
|
||||
Let's see which reactions got applied:
|
||||
#+BEGIN_SRC racket :results list :var input-rs=munch-sexp(rs1)
|
||||
(let ([rs (unorg-rs input-rs)])
|
||||
(let ([rs (read-org-rs input-rs)])
|
||||
(list-enabled rs (set 'x 't)))
|
||||
#+END_SRC
|
||||
|
||||
|
@ -638,7 +638,7 @@ tab
|
|||
- t
|
||||
|
||||
#+BEGIN_SRC racket :results output drawer :var input-ctx=munch-sexp(ctx1)
|
||||
(read-ctx input-ctx)
|
||||
(read-context-sequence input-ctx)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -652,7 +652,7 @@ tab
|
|||
#+NAME: rs1-sgr
|
||||
#+HEADER: :var input-rs=munch-sexp(rs1) :var input-ctx=munch-sexp(ctx1)
|
||||
#+BEGIN_SRC racket :results output drawer
|
||||
(dotit (ppsg (build-interactive-process-graph (unorg-rs input-rs) (read-ctx input-ctx))))
|
||||
(dotit (pretty-print-state-graph (build-interactive-process-graph (read-org-rs input-rs) (read-context-sequence input-ctx))))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: rs1-sgr
|
||||
|
@ -696,7 +696,7 @@ tab
|
|||
#+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))
|
||||
(build-interactive-process (read-org-rs input-rs) (read-context-sequence input-ctx))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: rs1-ip
|
||||
|
|
Loading…
Reference in New Issue