anchor.diff:      (update state :counter + n)))
   ----
   
  -The same event would look much uglier if defined using function syntax:
  +The same event would look much uglier if defined using function
  +syntax:
   
   [source, clojure]
   ----
  
positive.code: 
  === Store
  
  In the previous section we have seen events, the *store* is the object that
  processes them. It has the following responsibilities:
  
  - Hold the application state.
  - Process incoming events.
  - Emit the changes using reactive streams.
  
  In the contrast to other similar approaches to implementing store (such that
  re-frame or redux), this approach does not allow to access the state directly,
  you only can watch it and materialize it to some reference type like
  ClojureScript *atom*. This ensures that the state can only be transformed using
  events.
  
  To create store you just need to execute the `potok.core/store` function:
  
  [source, clojure]
  ----
  (def store (ptk/store))
  ----
  
  If no arguments is passed to `store` function, the initial state is initialized
  as `nil`. This is how you can provide an initial state:
  
  [source, clojure]
  ----
  (def store (ptk/store {:state {:counter 0}}))
  ----
  
  The `store` object from the user perspective is a reactive stream that emits the
  state each time it is transformed.
  
  Internally it is implemented using *BehaviorSubject* and each new subscription
  always receives the latest state object followed by state objects transformed by
  events.
  
  In order to be able to access the state, we need to materialize
  it. A good approach is using just an atom to hold the materialized state:
  
  [source, clojure]
  ----
  
negative.code: 
  === Error Handling
  
  In many circumstances we found, that exception is raised inside the
  event. For this case *potok* comes with the built-in mechanism for
  handling errors.
  
  Let's see some code:
  
  