Log to show what is going on in the box-and-client example
This commit is contained in:
parent
3087658f01
commit
2ae8817a6b
|
@ -7,6 +7,7 @@
|
||||||
(spawn (lambda (e current-value)
|
(spawn (lambda (e current-value)
|
||||||
(match e
|
(match e
|
||||||
[(message (set-box new-value))
|
[(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))
|
(transition new-value (patch-seq (retract (box-state current-value))
|
||||||
(assert (box-state new-value))))]
|
(assert (box-state new-value))))]
|
||||||
[_ #f]))
|
[_ #f]))
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
(transition s (for/list [(v (matcher-project/set/single
|
(transition s (for/list [(v (matcher-project/set/single
|
||||||
added
|
added
|
||||||
(compile-projection (box-state (?!)))))]
|
(compile-projection (box-state (?!)))))]
|
||||||
|
(log-info "client: learned that box's value is now ~v" v)
|
||||||
(message (set-box (+ v 1)))))]
|
(message (set-box (+ v 1)))))]
|
||||||
[_ #f]))
|
[_ #f]))
|
||||||
(void)
|
(void)
|
||||||
|
|
Loading…
Reference in New Issue