aboutsummaryrefslogtreecommitdiff
path: root/module/util.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-04-06 19:08:59 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2019-04-13 00:14:55 +0200
commit59f6fc205b19f0cd2253adb7c656c4eda904a52e (patch)
tree2390a02195fdae3d79aa2b39d39e134c93871e3c /module/util.scm
parentRework how attributes and properties are accessed. (diff)
downloadcalp-59f6fc205b19f0cd2253adb7c656c4eda904a52e.tar.gz
calp-59f6fc205b19f0cd2253adb7c656c4eda904a52e.tar.xz
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.
Diffstat (limited to 'module/util.scm')
-rw-r--r--module/util.scm9
1 files changed, 7 insertions, 2 deletions
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))