Commits

Anonymous committed 5578467

Make reset! return the new value

Comments (0)

Files changed (1)

clojurian-atom.scm

           new
           (loop)))))
 
-(define (reset! atom val)
+(define (reset! atom value)
   (dynamic-wind
       (lambda ()
         (mutex-lock! (atom-mutex atom)))
       (lambda ()
-        (atom-value-set! atom val))
+        (atom-value-set! atom value)
+        value)
       (lambda ()
         (mutex-unlock! (atom-mutex atom)))))