Advertisement
Guest User

Account-Map Clojure

a guest
Nov 22nd, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def account-map {:fname "empty"
  2.                   :lname "empty"
  3.                   :d-o-b "00/00/00"
  4.                   :curr-amnt 0
  5.                   :dep-amnt (defn deposit-calc [& x]
  6.                               (let [deposit-total(+ 0 x)])
  7.                               deposit-total)
  8.                   :with-amnt (defn withdraw-calc [& n]
  9.                                (let [withdraw-total (+ 0 n)])
  10.                                withdraw-total)
  11.                   :new-amnt (defn new-calc [deposit withdraw current]
  12.                               (let new-amount
  13.                                 (- (+ deposit current) withdraw))
  14.                               new-amount)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement