From 59f6fc205b19f0cd2253adb7c656c4eda904a52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 6 Apr 2019 19:08:59 +0200 Subject: Add earlier work on timezones. Add earlier work on timezones, with a few inline modifications. This is really to big of a commit. But we are so far from a stable release that it should be fine. The current version seems to eager, and recalculates to many times. This will soon be fixed in a future version. --- module/util.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/util.scm') diff --git a/module/util.scm b/module/util.scm index 25be0389..cdc6026d 100644 --- a/module/util.scm +++ b/module/util.scm @@ -152,8 +152,13 @@ (set! rest ...))))) ;; Like set!, but applies a transformer on the already present value. -(define-syntax-rule (mod! field transform-proc) - (set! field (transform-proc field))) +(define-syntax mod! + (syntax-rules () + ((_ field proc) + (set! field (proc field))) + ((_ field transform-proc rest ...) + (begin (set! field (transform-proc field)) + (mod! rest ...))))) (define-public (concat lists) (apply append lists)) -- cgit v1.2.3