diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-02-21 03:21:43 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-11 19:58:54 +0200 |
commit | c26324e29043423387c3041e86d8cbe5cd4102b2 (patch) | |
tree | 6395e01b19572bbc22487115e52cadd1f39fafcf /module/datetime/zic.scm | |
parent | Fix seeding of UUIDs. (diff) | |
download | calp-c26324e29043423387c3041e86d8cbe5cd4102b2.tar.gz calp-c26324e29043423387c3041e86d8cbe5cd4102b2.tar.xz |
Change `kvlist->assq` and `group-by` to return pairs.
Each value in the return of group-by must have exactly two values, so
cons pairs (instead of lists) is much better.
Diffstat (limited to 'module/datetime/zic.scm')
-rw-r--r-- | module/datetime/zic.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/datetime/zic.scm b/module/datetime/zic.scm index ace3d991..470f6c07 100644 --- a/module/datetime/zic.scm +++ b/module/datetime/zic.scm @@ -298,16 +298,16 @@ (for-each (lambda (group) (hashq-set! rules (car group) - (sort* (cadr group) + (sort* (cdr group) (lambda (a b) (if (eq? 'minimum) #t (< a b))) rule-from))) - (group-by rule-name (car it)))) + (group-by rule-name it))) ;; put zones in map (awhen (assoc-ref groups 'zone) (for-each (lambda (zone) (hash-set! zones (zone-name zone) (zone-entries zone))) - (car it))) + it)) ;; resolve links to extra entries in the zone map (awhen (assoc-ref groups 'link) @@ -318,7 +318,7 @@ (if (not target-item) (warning (G_ "Unresolved link, target missing ~a -> ~a") name target) (hash-set! zones name target-item)))) - (car it))) + it)) (make-zoneinfo rules zones))) |