;; Load Terracotta module (load "kwtc.scm") ;; Define shared root object (define ob (create-root "list" (:new))) ;; Write a value to the object (sync-write (lambda () (ob:add 1)) ob) ;; Get the value (ob:get 0) ;; Get the value in synchronized context (define res (sync-read (lambda () (ob:get 0)) ob)) (display res)