       (defonce my-atom3 (atom nil))
       (defonce published3 (atom nil))
       (reset! published3 nil)
-      (defonce host3 {:pub #(swap! published3 conj %)
-                      :sub (fn [key f])
-                      :time (constantly 23456)})
       (defview my-tweets3 [user]
         [:tweetlog/tweeted user tweet]
         :store-in my-atom3)

                                 :data ["hello" 12345]
                                 :readers #{}
                                 :writers #{"alice"}}] 3)
      (let [valmap (first (my-tweets4 host4 "alice"))]
        (is (fn? (:swap! valmap)))
        ((:swap! valmap) assoc :tweet "world")
        (is (= @published4
               [{:kind :fact
                  :name "tweetlog/tweeted"
                  :key "alice"
                  :removed ["hello" 12345]
                  :data ["world" 12345]
                  :ts 34567
                  :change 3
                  :readers #{}
                  :writers #{"alice"}}]))))

[[:section {:title "Filtering"}]]
"Views can define client-side filtering for facts."

Parameters already given to the view function (e.g., `:user \"alice\"` in the following example) should be omitted."
(fact defview-ev-1a
      (reset! published2 [])
      (let [host {:sub (:sub ps2)
                  :pub #(swap! published2 conj %)
                  :time (constantly 12345)
                  :identity (atom "alice")}
            {:keys [add]} (meta (my-tweets2 host "alice"))]
        (is (fn? add))
        (add {:tweet "Hola!"})
        (is (= @published2
               [{:kind :fact
                 :name "tweetlog/tweeted"
                 :key "alice"
                 :data ["Hola!"]
                 :ts 12345
                 :change 1
                 :writers #{"alice"}
                 :readers #{}}]))))

"The `:readers` and `:writers` sets in newly-added facts are controlled by the optional `:readers` and `:writers` keyword arguments in the view definition.
