diff options
Diffstat (limited to 'guile/starlet/state.scm')
-rw-r--r-- | guile/starlet/state.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/guile/starlet/state.scm b/guile/starlet/state.scm index 0fff383..0047014 100644 --- a/guile/starlet/state.scm +++ b/guile/starlet/state.scm @@ -57,7 +57,8 @@ value->number atomically-overlay-state! update-state! - add-update-hook!)) + add-update-hook! + state-empty?)) ;; A "state" is an atomically-updating container for an immutable @@ -452,3 +453,8 @@ pre-existing contents." (set! selection (flatten-sublists fixture-list)))) (run-hook selection-hook selection)) + +(define (state-empty? st) + (hash-table-empty? + (atomic-box-ref + (get-ht-box st)))) |