(ns clojure.examples.example
(:gen-class))
(defn Example []
(def my-ref (ref 1 :validator pos?))
(dosync
(ref-set my-ref 2))
(println @my-ref))
(Example)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265722.html
(ns clojure.examples.example
(:gen-class))
(defn Example []
(def my-ref (ref 1 :validator pos?))
(dosync
(ref-set my-ref 2))
(println @my-ref))
(Example)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265722.html