       (do (swap! state dissoc id)
           true)
       false)))
-
-(defmacro def-delete-handler [name Model]
-  `(s/defn ~name :- s/Bool
-     [state# :- (s/atom {s/Str ~Model})
-      id# :- s/Str]
-     (if (contains? (deref state#) id#)
-       (do (swap! state# dissoc id#)
-           true)
-       false)))
 
 (defn list-handler [Model]
   (s/fn :- (s/maybe Model)

    [state :- (s/atom {s/Str Model})
     id :- s/Str]
    (get (deref state) id)))

(defmacro def-read-handler [name Model]
  `(s/defn ~name :- (s/maybe ~Model)
     [state# :- (s/atom {s/Str ~Model})
      id# :- s/Str]
     (get (deref state#) id#)))

(defn create-handler-from-realized
  "Create a new resource from a realized object"

                                 (= v# (get model# k# ::not-found))))
                             filter-map#))
                   (vals (deref state#))))))
