aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/state-rw.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-01-31 16:27:30 +0100
committerThomas White <taw@physics.org>2021-01-31 16:27:30 +0100
commitb960ac6f3bca42901694cd76218796108e0127a8 (patch)
treee2d889d2531dbc6c79c7ca78d0c275356511de9b /guile/starlet/state-rw.scm
parentd84543e948e7faacd6e4e55b3583b88289ec9147 (diff)
Initial part of writing out states
Diffstat (limited to 'guile/starlet/state-rw.scm')
-rw-r--r--guile/starlet/state-rw.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/guile/starlet/state-rw.scm b/guile/starlet/state-rw.scm
new file mode 100644
index 0000000..5b14c6e
--- /dev/null
+++ b/guile/starlet/state-rw.scm
@@ -0,0 +1,13 @@
+(define-module (starlet state-rw)
+ #:use-module (starlet base)
+ #:export (write-state))
+
+
+(define (write-state state)
+ (state-map
+ (lambda (fix attr val)
+ (list 'at
+ (get-fixture-name fix)
+ (get-attr-name attr)
+ val))
+ state))