syndicate-2017/racket/typed/tests/define-dataflow.rkt

12 lines
286 B
Racket
Raw Normal View History

2019-10-03 19:24:31 +00:00
#lang typed/syndicate/roles
(run-ground-dataspace (U)
(spawn (U)
(start-facet x
(field [y Int 0])
(define/dataflow x (add1 (ref y)))
(displayln (add1 (ref x)))
;; print 2
#f))
)