aboutsummaryrefslogtreecommitdiffstats
path: root/mcgoron.cond-thunk.scm
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-01-09 15:59:48 -0500
committerGravatar Peter McGoron 2025-01-09 15:59:48 -0500
commit0db5a207707a1913986a364cf620a361bc788d57 (patch)
tree8075af7fa65561f706de22d2c74e3647e50a3089 /mcgoron.cond-thunk.scm
parentadd receive-ct (diff)
evaluate-thunk-to-boolean
Diffstat (limited to '')
-rw-r--r--mcgoron.cond-thunk.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/mcgoron.cond-thunk.scm b/mcgoron.cond-thunk.scm
index ebd8bfd..53a4300 100644
--- a/mcgoron.cond-thunk.scm
+++ b/mcgoron.cond-thunk.scm
@@ -56,3 +56,10 @@
(define name
(lambda-ct formal conditional body ...)))))
+(define-syntax evaluate-thunk-to-boolean
+ (syntax-rules ()
+ ((evaluate-thunk-to-boolean (thunk args ...))
+ (cond
+ ((thunk args ...) #t)
+ (else #f)))))
+