Clojure - atoms

Skip to main content guest Join | Help | Sign In Clojure Home guest | Join | Help | Sign In Clojure Dev IRC Blog Wiki Download Google Group Videos Contrib Libraries Rationale Features Download Getting Started Documentation Libraries Community Contributing ClojureScript ClojureCLR License atoms Edit 0 3 … 0 Tags No tags Notify RSS Backlinks Source Print Export (PDF) ws:start:WikiTextHeadingRule:1:<h1> Atoms provide a way to manage shared, synchronous, independent state. They are a reference type like refs and vars. You create an atom with atom , and can access its state with deref/@ . Like refs and agents, atoms support validators. To change the value of an atom, you can use swap! . A lower-level compare-and-set! is also provided. Changes to atoms are always free ...

Linked on 2014-11-29 04:31:30 | Similar Links