2009-11-14から1日間の記事一覧
Programming Clojureをcommuteの説明まで読んだので、alterとcommuteの違いが分かるようなサンプルプログラムを書いてみた。test.clj (def *counter* (ref 0)) (defn test-func [name time] (fn [] (dotimes [i 5] (Thread/sleep 1000) (print (format "%d: …
Programming Clojureをcommuteの説明まで読んだので、alterとcommuteの違いが分かるようなサンプルプログラムを書いてみた。test.clj (def *counter* (ref 0)) (defn test-func [name time] (fn [] (dotimes [i 5] (Thread/sleep 1000) (print (format "%d: …