读取原子值

要读取原子的值,只需输入原子的名称,并在其前面加上 @:

@counter ; => 0

一个更大的例子:

(def number (atom 3))
(println (inc @number))
;; This should output 4