2016-04-01 23:53:46 +00:00
|
|
|
#lang syndicate
|
2016-02-12 04:50:37 +00:00
|
|
|
;; The actor should receive a single event adding the (at-meta x) assertion.
|
|
|
|
|
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
|
|
|
|
(list (patch-seq (sub 'x #:meta-level 1)
|
|
|
|
(assert (at-meta 'x))))))
|