zilti's philosophical paste added by zilti on Fri Dec 8 09:31:19 2023

  (let ((A '((#:X . 5) (#:Y . 10)))
        (X-buf 5))
    (alist-update #:X X-buf 
                  (map (lambda (a)
                         (cond ((eqv? #:X (car a)) a)
                               (else
                                (let ((new-Y X-buf))
                                  (set! X-buf 0)
                                  (cons (car a) new-Y)))))
                       A))))
  ;; => ((X . 5) (Y . 5))


  (let* ((A '((#:X . 5) (#:Y . 10)))
         (X-buf 5)
         (new-A (map (lambda (a)
                         (cond ((eqv? #:X (car a)) a)
                               (else
                                (let ((new-Y X-buf))
                                  (set! X-buf 0)
                                  (cons (car a) new-Y)))))
                       A)))
    (alist-update #:X X-buf new-A))
  ;; => ((X . 0) (Y . 5))