From d099dcbb755f1330224568e3b9aeae1a9e4214b7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 19 Aug 2020 17:10:02 +0200 Subject: Add lots more side-effects --- guile/starlet/base.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'guile/starlet/base.scm') diff --git a/guile/starlet/base.scm b/guile/starlet/base.scm index 83fb04d..39dc214 100644 --- a/guile/starlet/base.scm +++ b/guile/starlet/base.scm @@ -8,7 +8,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:export ( - start-ola-output patch-fixture + start-ola-output patch-fixture! set-attr! home-attr! home-all! blackout scanout-freq make-empty-state register-state! percent->dmxval msb lsb chan @@ -143,9 +143,9 @@ ;; Patch a new fixture -(define* (patch-fixture class - start-addr - #:key (universe 1) (friendly-name "Fixture")) +(define* (patch-fixture! class + start-addr + #:key (universe 1) (friendly-name "Fixture")) (let ((new-fixture (make class #:sa start-addr #:uni universe @@ -189,7 +189,7 @@ ;; Add the contents of state "new" to "combined-state" -(define (add-state-to-state merge-rule new combined-state) +(define (add-state-to-state! merge-rule new combined-state) (state-for-each (lambda (fix attr value) (let ((current-value (state-find fix attr @@ -244,9 +244,9 @@ (define (merge-states merge-rule list-of-states) (let ((combined-state (make ))) (for-each (lambda (state) - (add-state-to-state merge-rule - (expand-state state) - combined-state)) + (add-state-to-state! merge-rule + (expand-state state) + combined-state)) list-of-states) combined-state)) -- cgit v1.2.3