2016-04-01 23:53:46 +00:00
|
|
|
#lang syndicate
|
2016-07-30 17:02:07 +00:00
|
|
|
;; The actor should receive a single event adding an (inbound 'x) assertion.
|
2016-02-12 04:50:37 +00:00
|
|
|
|
2016-04-01 23:53:46 +00:00
|
|
|
(require syndicate/pretty)
|
2016-02-12 04:50:37 +00:00
|
|
|
|
2016-04-07 07:42:54 +00:00
|
|
|
(spawn-dataspace
|
2016-02-12 04:50:37 +00:00
|
|
|
(spawn (lambda (e counter)
|
|
|
|
(and e
|
|
|
|
(let ((new-counter (+ counter 1)))
|
2016-04-01 23:53:46 +00:00
|
|
|
(printf "Received event ~a:\n~a\n" new-counter (syndicate-pretty-print->string e))
|
2016-02-12 04:50:37 +00:00
|
|
|
(transition (+ counter 1) '()))))
|
|
|
|
0
|
2016-07-30 17:02:07 +00:00
|
|
|
(list (patch-seq (sub (inbound 'x))
|
|
|
|
(assert (outbound 'x))))))
|