From 6beaa3ae1f4951fb2a40513009bc020477f80c79 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 25 Apr 2023 21:12:23 +0200 Subject: Add OSC utilities --- guile/starlet/utils.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guile/starlet/utils.scm') diff --git a/guile/starlet/utils.scm b/guile/starlet/utils.scm index e38e6b7..e1b92a8 100644 --- a/guile/starlet/utils.scm +++ b/guile/starlet/utils.scm @@ -40,7 +40,8 @@ percent->dmxval16 comment hash-table-empty? - lookup)) + lookup + add-and-run-hook!)) (define (print-hash-table ht) @@ -173,3 +174,8 @@ (cadr (car dictionary))) (else (lookup key (cdr dictionary))))) + + +(define (add-and-run-hook! hook proc . initial-args) + (add-hook! hook proc) + (apply proc initial-args)) -- cgit v1.2.3