From ffd0a028aefd203b4a42ded1e5a592e1b4d92dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 4 Dec 2023 01:58:26 +0100 Subject: Complete rewrite of the lens system. The old "lens" system was more of nested accessors. This rewrites them to be much better, at the cost of some extra up-front complexity. Beside the change in lenses, and all required adjustments, also adds lens creation to the define-type macro. --- module/datetime/timespec.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/datetime/timespec.scm') diff --git a/module/datetime/timespec.scm b/module/datetime/timespec.scm index 7ea448a0..951ea729 100644 --- a/module/datetime/timespec.scm +++ b/module/datetime/timespec.scm @@ -58,8 +58,8 @@ ;; + + [(eq? (timespec-sign done) (timespec-sign spec)) - (modify done timespec-time - time+ (timespec-time spec))] + (modify done timespec-time* + (lambda (t) (time+ t (timespec-time spec))))] ;; - + [(and (eq? '- (timespec-sign done)) (eq? '+ (timespec-sign spec))) -- cgit v1.2.3