Commits

Anonymous committed d01d65b

Some renaming

Comments (0)

Files changed (1)

clojurian-atom.scm

 (define (atom value)
   (make-atom (make-mutex) value))
 
-(define (compare-and-set! atom expect update)
-  (and (eq? (atom-value atom) expect)
+(define (compare-and-set! atom old new)
+  (and (eq? (atom-value atom) old)
        (dynamic-wind
            (lambda ()
              (mutex-lock! (atom-mutex atom)))
            (lambda ()
-             (and (eq? (atom-value atom) expect)
+             (and (eq? (atom-value atom) old)
                   (begin
-                    (atom-value-set! atom update)
+                    (atom-value-set! atom new)
                     #t)))
            (lambda ()
              (mutex-unlock! (atom-mutex atom))))))