diff options
Diffstat (limited to 'guile/starlet')
-rw-r--r-- | guile/starlet/scanout.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guile/starlet/scanout.scm b/guile/starlet/scanout.scm index c5b95aa..70698d4 100644 --- a/guile/starlet/scanout.scm +++ b/guile/starlet/scanout.scm @@ -31,6 +31,7 @@ #:use-module (srfi srfi-1) #:export (patch-fixture! scanout-freq + total-num-attrs register-state! current-value)) @@ -45,6 +46,13 @@ (define state-names (make-atomic-box '())) +(define (total-num-attrs) + (fold (lambda (fix prev) + (+ prev (length (get-fixture-attrs fix)))) + 0 + (atomic-box-ref fixtures))) + + (define (get-state-name st) (assq-ref (atomic-box-ref state-names) st)) |