Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (dosync
- (ensure (:balance srcAcct))
- (if (>= @(:balance srcAcct) amnt)
- (do
- ; update the balance refs of both bank accounts
- (alter (:balance srcAcct) - amnt)
- (commute (:balance dstAcct) + amnt)
- (str tid " OK"))
- (str tid " ERR")))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement