Advertisement
Guest User

Untitled

a guest
May 23rd, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (dosync
  2.       (ensure (:balance srcAcct))
  3.            (if (>= @(:balance srcAcct) amnt)
  4.             (do
  5.                 ; update the balance refs of both bank accounts
  6.                 (alter (:balance srcAcct) - amnt)
  7.                 (commute (:balance dstAcct) + amnt)
  8.                 (str tid " OK"))
  9.             (str tid " ERR")))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement