aboutsummaryrefslogtreecommitdiff
path: root/code.scm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xcode.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/code.scm b/code.scm
index 6586a9af..bbfc6e9a 100755
--- a/code.scm
+++ b/code.scm
@@ -38,3 +38,14 @@
(time<=? (date->time-utc input-date)
(date->time-utc then)))))
+
+(define-syntax-rule (color-if pred color body ...)
+ (let ((pred-value pred))
+ (format #f "~a~a~a"
+ (if pred-value color "")
+ (begin body ...)
+ (if pred-value STR-RESET ""))))
+
+(define-syntax-rule (for-each-in lst proc)
+ (for-each proc lst))
+