Log to show what is going on in the box-and-client example

This commit is contained in:
Tony Garnock-Jones 2015-12-03 12:53:53 -08:00
parent 3087658f01
commit 2ae8817a6b
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@
(spawn (lambda (e current-value)
(match e
[(message (set-box new-value))
(log-info "box: taking on new-value ~v" new-value)
(transition new-value (patch-seq (retract (box-state current-value))
(assert (box-state new-value))))]
[_ #f]))
@ -20,6 +21,7 @@
(transition s (for/list [(v (matcher-project/set/single
added
(compile-projection (box-state (?!)))))]
(log-info "client: learned that box's value is now ~v" v)
(message (set-box (+ v 1)))))]
[_ #f]))
(void)