Sha256: e78ce2509ddcf5038b4f79a2fbaaa691f2a5174539cbdacb64e9560c96525c93

Contents?: true

Size: 250 Bytes

Versions: 395

Compression:

Stored size: 250 Bytes

Contents

(ns bank-account)

(defn open-account []
  (ref 0))

(defn close-account [account]
  (dosync
    (ref-set account nil)))

(defn get-balance [account]
  (dosync
    @account))

(defn update-balance [account amt]
  (dosync
    (alter account + amt)))

Version data entries

395 entries across 395 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.138 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.137 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.136 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.135 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.134 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.133 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.132 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.131 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.130 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.129 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.128 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.127 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.126 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.125 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.124 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.123 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.122 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.121 tracks/clojure/exercises/bank-account/src/example.clj
trackler-2.2.1.120 tracks/clojure/exercises/bank-account/src/example.clj