diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-04 01:58:26 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-09 00:54:20 +0100 |
commit | ffd0a028aefd203b4a42ded1e5a592e1b4d92dd7 (patch) | |
tree | 7176aa23610558fde1c020ae0b096d2f43bc9dc7 /module/datetime/timespec.scm | |
parent | Cleanup datetime tests. (diff) | |
download | calp-ffd0a028aefd203b4a42ded1e5a592e1b4d92dd7.tar.gz calp-ffd0a028aefd203b4a42ded1e5a592e1b4d92dd7.tar.xz |
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.
Diffstat (limited to 'module/datetime/timespec.scm')
-rw-r--r-- | module/datetime/timespec.scm | 4 |
1 files changed, 2 insertions, 2 deletions
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))) |