aboutsummaryrefslogtreecommitdiffstats
path: root/mcgoron.cond-thunk.values.scm
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-01-09 16:21:39 -0500
committerGravatar Peter McGoron 2025-01-09 16:21:39 -0500
commitae436e505bf9f7dc47d605d88772c6bfcf93ca05 (patch)
tree738405485af92cd8fc449ad7377779b1fc939bd5 /mcgoron.cond-thunk.values.scm
parentevaluate-thunk-to-boolean (diff)
evaluate-destructor-to-booleanHEADmaster
Diffstat (limited to 'mcgoron.cond-thunk.values.scm')
-rw-r--r--mcgoron.cond-thunk.values.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/mcgoron.cond-thunk.values.scm b/mcgoron.cond-thunk.values.scm
index 03cae5b..2833de4 100644
--- a/mcgoron.cond-thunk.values.scm
+++ b/mcgoron.cond-thunk.values.scm
@@ -113,3 +113,10 @@
(after ((when (predicate? record)))
(values (accessor record) ...))))))))
+(define-syntax evaluate-destructor-to-boolean
+ (syntax-rules ()
+ ((_ destructor)
+ (case-receive destructor
+ (() #f)
+ (_ #t)))))
+