Commits

yongchao li committed f3e2a02

modify

Comments (0)

Files changed (3)

src/clj_test/atom_test.clj

+(ns clj_test.atom_test)
+(def current-track (atom "hello"))
+(deref current-track)
+@current-track
+
+(reset! current-track "ivan")
+@current-track

src/clj_test/custom-higher-order-fun.clj

 (def users [{:username "ivan"
              :balance 175.00
              :member-since "2001-2-6"}
-            {:username "lily"
+            {:username "aily"
              :balance 200.34
              :member-since "2001-4-5"}])
 
 (def poorest-first (sorter-using balance))
 (def alphabetically (sorter-using username))
 
-(println (poorest-first))
+(println (poorest-first users))
+(println (alphabetically users))

src/clj_test/higher-order.clj

 
 (call-twice 10)
 
-(binding [twice (with-log twice "call the twice function")] (call-twice 20))
+(let [aa (with-log twice "call the twice function")]
+  (aa 20))